Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update fork #2

Merged
merged 515 commits into from Feb 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
515 commits
Select commit Hold shift + click to select a range
9e17c9e
docs: improve index.html/project root explanation
yyx990803 Jan 24, 2021
a12095c
docs: document default css modules localsConvention
yyx990803 Jan 24, 2021
0bed9c4
perf(build): improve performance of default vendor chunk splitting (#…
finico Jan 24, 2021
028c3bb
fix: esbuild optimizer yarn 2 pnp compat
yyx990803 Jan 24, 2021
5ca43ef
fix: fix incorrect preload placeholder regex
yyx990803 Jan 24, 2021
6164794
release: v2.0.0-beta.47
yyx990803 Jan 24, 2021
6cd2d35
fix: remove preload markers in all cases
yyx990803 Jan 25, 2021
02a0324
fix: externalize known css types during dep-prebundling
yyx990803 Jan 25, 2021
2096309
fix: fallback to static middleware on unfound source maps
yyx990803 Jan 25, 2021
7f83deb
fix: preload marker incorrect replacement
yyx990803 Jan 25, 2021
b0b0b23
release: plugin-legacy@1.2.2
yyx990803 Jan 25, 2021
e2137b7
feat: resolved ids rollup compat for win32 (#1693)
patak-dev Jan 25, 2021
3240db1
fix: resolve library entry
yyx990803 Jan 25, 2021
830f3d3
feat: lit-element templates
yyx990803 Jan 25, 2021
e734e21
chore: tweak lit-element template
yyx990803 Jan 25, 2021
1ddbc57
release: v2.0.0-beta.48
yyx990803 Jan 25, 2021
fa1229a
feat: bump vuedx versions
yyx990803 Jan 25, 2021
784bf3b
release: create-app@1.5.0
yyx990803 Jan 25, 2021
6c96883
fix(optimizer): fix output to entry matching logic
yyx990803 Jan 25, 2021
cbeb9ba
fix: fix hmr.path option normalization
yyx990803 Jan 25, 2021
68960f7
fix(ssr): generate same asset url links for ssr build
yyx990803 Jan 25, 2021
33d3cca
fix(config): fix native esm config loading on windows
yyx990803 Jan 25, 2021
e6120d5
fix(optimizer): entry matching on windows
yyx990803 Jan 25, 2021
3d55e83
fix: do not move css modules to vendor chunk
yyx990803 Jan 25, 2021
a19c456
fix(watcher): ensure only add normalized file paths
yyx990803 Jan 25, 2021
64d2c17
fix(watcher): watch fs specific root paths
yyx990803 Jan 25, 2021
36857fc
release: v2.0.0-beta.49
yyx990803 Jan 25, 2021
8fb74f5
fix(optimizer): pnp compat to match relative paths (#1714)
AlexandreBonaventure Jan 25, 2021
dae6b52
test: skip browser connection for non-playground tests
yyx990803 Jan 25, 2021
45d8bf4
feat: allow speicfying ssr entry directly via build.ssr option
yyx990803 Jan 25, 2021
cebed88
test: ssr tests
yyx990803 Jan 25, 2021
1e67d66
fix: properly handle base + path in hmr config
yyx990803 Jan 25, 2021
e6f6a3d
docs: path normalization section (#1717)
patak-dev Jan 25, 2021
d055b04
docs: add lit-element to create-app supported templates (#1718)
feute Jan 26, 2021
1a9b321
fix(optimizer): fix entry analysis fs read on case-sensitive systems
yyx990803 Jan 26, 2021
0599908
fix(optimizer): externalize cross-package imported css
yyx990803 Jan 26, 2021
29d149d
docs: document css @import handling
yyx990803 Jan 26, 2021
c5fe45f
fix(optimizer): fix entry matching edge case
yyx990803 Jan 26, 2021
52c9416
fix(sourcemap): empty source map chain on nullified sourcemap
yyx990803 Jan 26, 2021
32413ce
fix(optimizer): handle special case where esm entry gets converted to…
yyx990803 Jan 26, 2021
35e1f52
fix: json plugin error report line regex (#1719)
HChange Jan 26, 2021
d8689b8
release: v2.0.0-beta.50
yyx990803 Jan 26, 2021
82d87d9
feat(css): support alias in css @imports
yyx990803 Jan 26, 2021
20bacf7
fix: handle vite client path with dollar signs (#1732)
merceyz Jan 26, 2021
2f41d3f
chore: only log errors when pre-bundling
yyx990803 Jan 26, 2021
6b619c4
fix(optimizer): do not perform treeshaking for pre-bundling
yyx990803 Jan 26, 2021
a5a6843
chore: comments
yyx990803 Jan 26, 2021
71fcfdf
fix: css @import alias for windows
yyx990803 Jan 26, 2021
1dfda16
fix: allow ssr css preloads in preload-helper (#1734)
bompus Jan 26, 2021
477f174
feat: proper css resolving + sass import url rebase
yyx990803 Jan 26, 2021
f266bb7
feat: import resolving + url rebasing for less
yyx990803 Jan 26, 2021
7043c4e
docs: document css import and rebasing support
yyx990803 Jan 26, 2021
0aa5849
refactor: expose file directly in chunk to css map
yyx990803 Jan 27, 2021
8b543a7
chore(create-app): add a note about using workspace TS
yyx990803 Jan 27, 2021
ce71d71
feat: add link to config docs
yyx990803 Jan 27, 2021
51bc1ec
feat: new manifest format
yyx990803 Jan 27, 2021
3dcf7f8
release: create-app@1.5.1
yyx990803 Jan 27, 2021
78eb32c
fix: resolve css @import relative imports without leading dot
yyx990803 Jan 27, 2021
73196e5
fix: don't override resolver options (#1740)
andrew0 Jan 27, 2021
3a221cf
chore: fix css tests
yyx990803 Jan 27, 2021
d0f8b12
feat: use esbuild to scan imports
yyx990803 Jan 27, 2021
a6ed213
docs: update optimizeDeps options
yyx990803 Jan 27, 2021
e74ddf2
wip: externalize excluded deps
yyx990803 Jan 27, 2021
929cba3
wip: no longer need pkg deps in optimizer hash
yyx990803 Jan 27, 2021
d42f2bf
wip: windows paths
yyx990803 Jan 27, 2021
c91dbe8
wip: handle absolute paths in html
yyx990803 Jan 27, 2021
ebe71c4
fix(optimizer): entry matching for .mjs entries
yyx990803 Jan 27, 2021
fd5e7c0
refactor: adjust optimizeDeps options
yyx990803 Jan 27, 2021
5f7698b
fix: scan on windows
yyx990803 Jan 27, 2021
7ea140c
chore: add link to discord chat
yyx990803 Jan 27, 2021
64ba807
feat: dep optimizer entry option
yyx990803 Jan 27, 2021
7c9ad4d
chore: avoid string.matchAll for compat
yyx990803 Jan 27, 2021
33be9a8
refactor: improve failed dep resolve error handling
yyx990803 Jan 27, 2021
5fe9001
wip: dep scanning handling glob import
yyx990803 Jan 27, 2021
470b4e4
feat: auto re-run dep optimization on discovery of new imports
yyx990803 Jan 27, 2021
c2e8806
fix(build): ensure lib mode file name is correctly inferred for scope…
LinusBorg Jan 27, 2021
52a3d68
chore: add icon on server start
yyx990803 Jan 27, 2021
b5987c1
fix(hmr): fix hmr for @fs urls
yyx990803 Jan 27, 2021
74b55b8
fix(optimizer): attempt resolve node builtin first before externalizing
yyx990803 Jan 27, 2021
f6db155
fix: avoid removing double slash in fileToUrl
yyx990803 Jan 27, 2021
327fa71
release: v2.0.0-beta.51
yyx990803 Jan 27, 2021
b2110af
fix(optimizer): fix optimizer updates on new dep discovery
yyx990803 Jan 28, 2021
99e4edd
fix: always normalize fs prefix slashes
yyx990803 Jan 28, 2021
6fe72f0
chore: remove unused logic
yyx990803 Jan 28, 2021
2f1efa3
fix(optimizer): fix ?raw import and import with queries in pre-bundling
yyx990803 Jan 28, 2021
7e726a6
release: v2.0.0-beta.52
yyx990803 Jan 28, 2021
ca862a2
fix: dependency scan with esbuild when using non-HTML entrypoints (#1…
ElMassimo Jan 28, 2021
6b154f0
Revert "chore: remove unused logic"
yyx990803 Jan 28, 2021
8e28803
fix: hold missing dep requests while re-bundling
yyx990803 Jan 28, 2021
c3e52f2
fix(optimizer): externalize json
yyx990803 Jan 28, 2021
be0e698
fix: more stable request hold
yyx990803 Jan 28, 2021
9ecf52b
fix(optimizer): use all inputs for optimized entry matching
yyx990803 Jan 28, 2021
216ae8e
fix(optimizer): add separate hash for invalidating optimized deps
yyx990803 Jan 28, 2021
02053a2
fix(optimizer): invalidate all modules on deps rebundle
yyx990803 Jan 28, 2021
925c3ba
docs: typo (#1773) [skip ci]
codeoD Jan 28, 2021
d5c2bc1
docs: correct localsConvention typo (#1764) [skip ci]
claudiomedina Jan 28, 2021
d69d49d
fix: fix pure css chunk removal
yyx990803 Jan 28, 2021
cadf38c
fix(css): pure css chunk removal + manifest entry with multiple css f…
yyx990803 Jan 28, 2021
f54839a
chore: move externalize warning to debug
yyx990803 Jan 28, 2021
475aae4
fix(optimizer): use vite resolver for yarn 2 fallback
yyx990803 Jan 28, 2021
04f9dc6
refactor: generate more controlled esbuild dep file structure
yyx990803 Jan 28, 2021
55bf2e0
release: v2.0.0-beta.53
yyx990803 Jan 28, 2021
06ed207
chore: only call Date.now when debugging
yyx990803 Jan 28, 2021
32ba8fb
fix(optimizer): map entries to their file paths when passed as importer
yyx990803 Jan 28, 2021
f31e11d
release: v2.0.0-beta.54
yyx990803 Jan 28, 2021
0f2c2ce
fix(optimizer): use js loader for resolved mjs files in esbuild
yyx990803 Jan 28, 2021
e7dd4f8
release: v2.0.0-beta.55
yyx990803 Jan 28, 2021
81eb7a0
fix(optimizer): handle alias to optimized entries
yyx990803 Jan 29, 2021
b24b07c
perf: use esbuild service mode during pre-bundling
yyx990803 Jan 29, 2021
cc14b16
test: test aliasing deps
yyx990803 Jan 29, 2021
5e2794b
test: test optimize dep with mjs entry
yyx990803 Jan 29, 2021
0e8f4cb
release: v2.0.0-beta.56
yyx990803 Jan 29, 2021
3dd1187
docs: add double dash in init example
yyx990803 Jan 29, 2021
6a03813
fix(optimizer): check qualified deps length after accounting for include
yyx990803 Jan 29, 2021
462f2bc
chore: improve pre-bundle message
yyx990803 Jan 29, 2021
d216da0
fix(optimizer): exclude ?worker and ?raw from runtime dep discovery
yyx990803 Jan 29, 2021
59c4e7f
fix(plugin-react-refresh): fix react refresh with base option
yyx990803 Jan 29, 2021
ff6149c
release: plugin-react-refresh@1.1.3
yyx990803 Jan 29, 2021
c3b81a8
fix(optimizer): properly externalize unknown types
yyx990803 Jan 29, 2021
40dde2b
docs: add repo setup guide in contributing.md [skip ci]
yyx990803 Jan 29, 2021
725f9d7
chore: add link to discord chat [ci skip]
yyx990803 Jan 29, 2021
82dce90
fix: still account for plugins in optimizer hash
yyx990803 Jan 29, 2021
328b6b9
fix(optimizer): respect ids that resolve to external urls during scan
yyx990803 Jan 29, 2021
a9ca3da
fix(optimizer): fix entry cross imports
yyx990803 Jan 29, 2021
f4719e4
release: v2.0.0-beta.57
yyx990803 Jan 29, 2021
470ceb8
feat: support configuring publicDir via config
yyx990803 Jan 29, 2021
e438802
fix: do not generate import specifier if not needed
yyx990803 Jan 29, 2021
dbe1f4a
feat: add ViteDevServer.transformIndexHtml method for ssr
yyx990803 Jan 29, 2021
d3397e6
fix(plugin-vue): special handling for class default export in sfc
yyx990803 Jan 29, 2021
73578d8
release: plugin-vue@1.1.3
yyx990803 Jan 29, 2021
a748896
fix(optimizer): handle rollup plugin virtual ids
yyx990803 Jan 29, 2021
a2ba25b
release: v2.0.0-beta.58
yyx990803 Jan 29, 2021
aaed7d7
docs: build.commonjsOptions no longer apply to pre-bundling
yyx990803 Jan 29, 2021
b132e82
docs: update dep pre-bundling page
yyx990803 Jan 29, 2021
6a72190
refactor: move container initialization out of scan plugin
yyx990803 Jan 29, 2021
2309e74
chore: remove stale condition
yyx990803 Jan 29, 2021
3c22f84
fix(optimizer): exclude should apply to deep imports
yyx990803 Jan 29, 2021
8e1d3d8
fix(optimizer): separate dep entry proxy modules from actual modules
yyx990803 Jan 30, 2021
39b4dea
docs: plugin naming conventions (#1806)
patak-dev Jan 30, 2021
b45b08d
chore: fix windows path
yyx990803 Jan 30, 2021
9deb6d7
release: v2.0.0-beta.59
yyx990803 Jan 30, 2021
99da554
chore(ssr-playground): use cross-env for serve command (#1810)
Jan 30, 2021
59fe913
fix(hmr): do not update on file unlink when there are no affected mod…
CHOYSEN Jan 30, 2021
bb7da3f
fix(plugin-vue): handle block src pointing to dependency files
yyx990803 Jan 30, 2021
cd09039
release: plugin-vue@1.1.4
yyx990803 Jan 30, 2021
febff7b
fix(optimizer): entry resolving for yarn pnp
yyx990803 Jan 30, 2021
f635971
fix(scan): skip non-absolute resolved paths during scan
yyx990803 Jan 31, 2021
dce82bf
refactor: remove unsupported plugin context methods
yyx990803 Jan 31, 2021
0006e89
feat: support ?url special query
yyx990803 Jan 31, 2021
924fad3
chore: fix tests
yyx990803 Jan 31, 2021
6895726
refactor: move optimize deps playground deps into its own dir
yyx990803 Jan 31, 2021
3b85296
fix(optimizer): fix cjs interop for packages that cannot be
yyx990803 Jan 31, 2021
9791522
docs: specify different commands for npm 6 vs 7
yyx990803 Jan 31, 2021
29bec9c
release: v2.0.0-beta.60
yyx990803 Jan 31, 2021
4b6ebc3
fix(optimizer): fix cjs export interop for webpacked output
yyx990803 Jan 31, 2021
045e519
feat(plugin-legacy): use compact output when transpiling legacy chunks
yyx990803 Jan 31, 2021
a018594
docs: fix typo in getting started guide (#1832) [skip ci]
rauchg Jan 31, 2021
fc439e7
docs: explicit import url (#1829)
patak-dev Jan 31, 2021
8ace645
fix(ssr): do not inject hmr timestamp when transforming for ssr (#1825)
lijianzhang Jan 31, 2021
e40e6b2
refactor(plugin-legacy): improve polyfill import removal strategy
yyx990803 Jan 31, 2021
23bd257
fix: remove unnecessary static alias logic
yyx990803 Feb 1, 2021
9c6edef
fix: yarn pnp resolveDir
yyx990803 Feb 1, 2021
2144ce9
refactor: reuse fileToDevUrl logic in css plugin
yyx990803 Feb 1, 2021
34894a2
fix(manifest): include assets referenced via CSS in manifest entries
yyx990803 Feb 1, 2021
41783fa
fix(less): fix less @import url rebasing
yyx990803 Feb 1, 2021
29353e8
release: v2.0.0-beta.61
yyx990803 Feb 1, 2021
c575004
release: plugin-legacy@1.2.3
yyx990803 Feb 1, 2021
da1b06f
feat: better build output + options for brotli / chunk size warning
yyx990803 Feb 1, 2021
be9bc3f
fix(scan): handle tsx lang in SFCs during dep scan (#1837)
blake-newman Feb 1, 2021
24b5a4c
chore(plugin-react-refresh): fix error message (#1842)
buffaybu Feb 2, 2021
8fa57a3
chore: do not warn on remote @import when minifying css
yyx990803 Feb 2, 2021
5735692
feat(dev): inject env for webworker (#1846)
underfin Feb 2, 2021
338d17a
fix(optimizer): fix cjs interop check on entries with identical ending
yyx990803 Feb 2, 2021
435da60
feat(plugin-react-refresh): allow specifying additional parser plugins
yyx990803 Feb 2, 2021
ae50e38
release: plugin-react-refresh@1.2.0
yyx990803 Feb 2, 2021
f8e4eeb
fix: properly cascade asset hash change
yyx990803 Feb 2, 2021
9d9fa17
fix(plugin-react-refresh): avoid using optional chaining for Node 12 …
yyx990803 Feb 2, 2021
8ddbc44
release: plugin-react-refresh@1.2.1
yyx990803 Feb 2, 2021
9d560d8
fix(plugin-react-refresh): do not pick up config file in react-refres…
yyx990803 Feb 2, 2021
caf750f
release: plugin-react-refresh@1.2.2
yyx990803 Feb 2, 2021
0e600e1
release: v2.0.0-beta.62
yyx990803 Feb 2, 2021
40be502
chore: add ssr playground pre-render example
yyx990803 Feb 2, 2021
295fd99
docs: revise features section
yyx990803 Feb 2, 2021
4ca98b4
docs: move static asset handling into its own page
yyx990803 Feb 2, 2021
1d5437d
fix: respect config.build.brotliSize in reporter
yyx990803 Feb 2, 2021
24695fe
fix(scan): handle import glob in jsx/tsx files
yyx990803 Feb 3, 2021
0275f1f
chore: log indent fix
yyx990803 Feb 3, 2021
e089eff
fix: make ssr external behavior consistent between dev/build
yyx990803 Feb 3, 2021
928fc33
fix(ssr): improve ssr external heuristics
yyx990803 Feb 3, 2021
6d2a45c
refactor(playground): split vue/react ssr playground + add routers
yyx990803 Feb 3, 2021
0fe2634
feat(ssr): graduate ssr method types
yyx990803 Feb 3, 2021
3f6d129
chore: fix less type
yyx990803 Feb 3, 2021
71f1c63
chore: do not clearline if not logging
yyx990803 Feb 3, 2021
a139fba
docs: update optimizeDeps options
yyx990803 Feb 3, 2021
9cdf424
refactor: improve ssr examples
yyx990803 Feb 3, 2021
424a95e
docs: ssr guide
yyx990803 Feb 3, 2021
a88781e
chore: remove temp file
yyx990803 Feb 3, 2021
94a8042
fix: only close if http server has listened
yyx990803 Feb 3, 2021
da36547
chore: bump test wait retires
yyx990803 Feb 3, 2021
8ad7ecd
fix: do not shim process with actual object
yyx990803 Feb 3, 2021
cd13ef0
fix: consistently use mode for NODE_ENV in deps
yyx990803 Feb 3, 2021
501bef2
docs: update plugin-react-refresh README.md for middleware mode (#185…
pengx17 Feb 3, 2021
000ee62
fix(css): hoist external @import in concatenated css
yyx990803 Feb 3, 2021
b065ede
fix(vite): close server and exit if stdin ends (#1857)
nullpilot Feb 3, 2021
cb7b6be
fix(css): respect sass partial import convention
yyx990803 Feb 3, 2021
b0e12c2
test: remove stdin.resume() call
yyx990803 Feb 3, 2021
879922d
release: v2.0.0-beta.63
yyx990803 Feb 3, 2021
d021506
fix(ssr): do not resolve to optimized deps during ssr
yyx990803 Feb 3, 2021
8ec2d6f
fix(ssr): fix externalized cjs deps that exports compiled esmodule
yyx990803 Feb 3, 2021
cdab0a7
docs: ssr docs edits
yyx990803 Feb 3, 2021
79dd32c
feat(create-app): more detailed instructions for vue-ts template
yyx990803 Feb 3, 2021
88f30d6
release: v2.0.0-beta.64
yyx990803 Feb 3, 2021
4116727
release: create-app@1.5.2
yyx990803 Feb 3, 2021
6a793d3
perf: improve resolve cache
yyx990803 Feb 3, 2021
df8dd67
docs: ssr docs edits
yyx990803 Feb 3, 2021
578c591
fix: do not include vite in ssr externals
yyx990803 Feb 4, 2021
fd33436
docs: ssr typos and edits (#1870)
patak-dev Feb 4, 2021
c741872
fix(resolve): prioritize file over dir with same name for resolve
yyx990803 Feb 4, 2021
3eed499
docs: logo
yyx990803 Feb 4, 2021
0ea710e
chore: readme
yyx990803 Feb 4, 2021
5d3107a
fix(dev): check wasClean in onclose event (#1872)
mj2ks Feb 4, 2021
3fad3ba
fix(ssr): respect user defines for ssr
yyx990803 Feb 4, 2021
1fdc710
fix: better dependency non-js type file handling
yyx990803 Feb 4, 2021
f90a85c
feat: support resolving style/sass entries in css @import
yyx990803 Feb 4, 2021
159cc79
feat: support absolute glob patterns
yyx990803 Feb 4, 2021
c76c884
docs: fix pre-bundling link (#1892)
cbourgois Feb 5, 2021
2c914a5
fix(create-app): add resolveJsonModule to tsconfig.json for vue-ts te…
antfu Feb 5, 2021
fee7393
refactor(css): use default CSS modules localsConvention settings
yyx990803 Feb 5, 2021
3c7b652
feat(cli): make --ssr flag value optional
yyx990803 Feb 5, 2021
fc4dc18
test: fix vue test for css modules change
yyx990803 Feb 5, 2021
d6bf066
feat(create-app): clearer vue-ts setup recommend (#1896) [skip ci]
johnsoncodehk Feb 5, 2021
02653f0
fix(build): ignore html asset urls that do not exist on disk
yyx990803 Feb 5, 2021
98c9b32
docs: special queries, plugins vs features note (#1878)
patak-dev Feb 5, 2021
9c819b9
refactor: only ignore error if is ENOENT
yyx990803 Feb 5, 2021
e81a118
feat(proxy): support conditional options for proxy request (#1888)
cisen Feb 5, 2021
f43b420
release: v2.0.0-beta.65
yyx990803 Feb 5, 2021
6869d0e
docs: logo + favicon
yyx990803 Feb 5, 2021
a3de585
docs: style tweaks
yyx990803 Feb 5, 2021
87f0009
release: create-app@1.6.0
yyx990803 Feb 5, 2021
9273106
chore: typo [skip ci]
yyx990803 Feb 5, 2021
2cb5afc
docs: remove stale style tag
yyx990803 Feb 5, 2021
b18eaad
docs: rewrite introduction
yyx990803 Feb 5, 2021
814c5d3
docs: add link to comparisons in intro
yyx990803 Feb 5, 2021
da99738
docs: update the comparison section
yyx990803 Feb 5, 2021
6e0cd8e
docs: more comparison
yyx990803 Feb 5, 2021
185a727
docs: fix ts plugin name (#1905)
okxiaoliang4 Feb 6, 2021
f5cd959
docs(create-app): add link to script setup RFC (#1913)
patak-dev Feb 7, 2021
7c91531
chore(create-app): add .gitignore to vanilla template (#1932)
patak-dev Feb 7, 2021
dbbecdb
dx(cli): adjust whitespace in console (#1920)
threepointone Feb 7, 2021
5b56d70
fix(plugin-vue): import vue file as raw correctly (#1923)
CHOYSEN Feb 7, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions .eslintrc.js
Expand Up @@ -12,15 +12,15 @@ module.exports = {
'error',
{
allowModules: ['types', 'estree', 'testUtils'],
tryExtensions: ['.ts', '.js']
tryExtensions: ['.ts', '.js', '.jsx', '.tsx']
}
],
'node/no-missing-require': [
'error',
{
// for try-catching yarn pnp
allowModules: ['pnpapi'],
tryExtensions: ['.ts', '.js']
tryExtensions: ['.ts', '.js', '.jsx', '.tsx']
}
],
'node/no-restricted-require': [
Expand All @@ -38,7 +38,7 @@ module.exports = {
'node/no-extraneous-import': [
'error',
{
allowModules: ['vite']
allowModules: ['vite', 'less', 'sass']
}
],
'node/no-extraneous-require': [
Expand Down
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Discord Chat
url: https://chat.vitejs.dev
about: Ask questions and discuss with other Vite users in real time.
- name: Questions & Discussions
url: https://github.com/vitejs/vite/discussions
about: Use GitHub discussions for message-board style questions and discussions.
2 changes: 1 addition & 1 deletion .github/commit-convention.md
Expand Up @@ -7,7 +7,7 @@
Messages must be matched by the following regex:

``` js
/^(revert: )?(feat|fix|docs|style|refactor|perf|test|workflow|build|ci|chore|types|wip): .{1,50}/
/^(revert: )?(feat|fix|docs|dx|refactor|perf|test|workflow|build|ci|chore|types|wip|release|deps)(\(.+\))?: .{1,50}/
```

#### Examples
Expand Down
44 changes: 43 additions & 1 deletion .github/contributing.md
@@ -1,6 +1,48 @@
# Vite Contributing Guide

Hi! We are really excited that you are interested in contributing to Vite. Before submitting your contribution, please make sure to take a moment and read through the following guidelines:
Hi! We are really excited that you are interested in contributing to Vite. Before submitting your contribution, please make sure to take a moment and read through the following guide:

## Repo Setup

The Vite repo is a monorepo using Yarn workspaces. The package manager used to install and link dependencies must be [Yarn v1](https://classic.yarnpkg.com/).

To development and test the core `vite` package:

1. Go to `packages/vite` and run `yarn dev`. This starts `tsc` in watch mode.

2. Run `yarn link` in `packages/vite`. This links `vite` globally so that you can:

- Run `yarn link vite` in another Vite project to use the locally built Vite;
- Use the `vite` binary anywhere.

## Running Tests

Each package under `packages/playground/` contains a `__tests__` directory. The tests are run using [Jest](https://jestjs.io/) + [Playwright](https://playwright.dev/) with custom integrations to make writing tests simple. The detailed setup is inside `jest.config.js` and `scripts/jest*` files.

Each test can be run under either dev server mode or build mode.

- `yarn test` by default runs every test in both serve and build mode.

- `yarn test-serve` runs tests only under serve mode.

- `yarn test-build` runs tests only under build mode.

- You can also use `yarn test-serve [match]` or `yarn test-build [match]` to run tests in a specific playground package, e.g. `yarn test-serve css` will run tests for both `playground/css` and `playground/css-codesplit` under serve mode.

Note package matching is not aviable for the `yarn test` script, which always runs all tests.

### Test Env and Helpers

Inside playground tests, a global `page` object is automatically available, which is a Playwright [`Page`](https://playwright.dev/docs/api/class-page) instance that has already navigated to the served page of the current playground. So writing a test is as simple as:

```js
test('should work', async () => {
expect(await page.textContent('.foo')).toMatch('foo')
})
```

Some common test helpers, e.g. `testDir`, `isBuild` or `editFile` are available in `packages/playground/testUtils.ts`.

## Pull Request Guidelines

- Checkout a topic branch from a base branch, e.g. `main`, and merge back against that branch.
Expand Down
1,646 changes: 0 additions & 1,646 deletions CHANGELOG.md

This file was deleted.

33 changes: 28 additions & 5 deletions README.md
@@ -1,9 +1,19 @@
# vite ⚡
<p align="center">
<a href="https://vitejs.dev" target="_blank" rel="noopener noreferrer">
<img width="180" src="https://vitejs.dev/logo.svg" alt="Vite logo">
</a>
</p>
<br/>
<p align="center">
<a href="https://npmjs.com/package/vite"><img src="https://img.shields.io/npm/v/vite.svg" alt="npm package"></a>
<a href="https://nodejs.org/en/about/releases/"><img src="https://img.shields.io/node/v/vite.svg" alt="node compatility"></a>
<a href="https://app.circleci.com/pipelines/github/vitejs/vite?branch=main"><img src="https://circleci.com/gh/vitejs/vite/tree/main.svg?style=shield" alt="unix build status"></a>
<a href="https://ci.appveyor.com/project/yyx990803/vite/branch/main"><img src="https://ci.appveyor.com/api/projects/status/0q4j8062olbcs71l/branch/main?svg=true" alt="windows build status"></a>
<a href="https://chat.vitejs.dev"><img src="https://img.shields.io/badge/chat-discord-blue?style=flat&logo=discord" alt="discord chat"></a>
</p>
<br/>

[![npm][npm-img]][npm-url]
[![node][node-img]][node-url]
[![unix CI status][unix-ci-img]][unix-ci-url]
[![windows CI status][windows-ci-img]][windows-ci-url]
# Vite ⚡

> Next Generation Frontend Tooling

Expand All @@ -28,6 +38,17 @@ In addition, Vite is highly extensible via its [Plugin API](https://vitejs.dev/g

Vite is now in 2.0 beta. Check out the [Migration Guide](https://vitejs.dev/guide/migration.html) if you are upgrading from 1.x.

## Packages

| Package | Version (click for changelogs) |
| ------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------- |
| [vite](packages/vite) | [![vite version](https://img.shields.io/npm/v/vite.svg?label=%20)](packages/vite/CHANGELOG.md) |
| [@vitejs/plugin-vue](packages/plugin-vue) | [![plugin-vue version](https://img.shields.io/npm/v/@vitejs/plugin-vue.svg?label=%20)](packages/plugin-vue/CHANGELOG.md) |
| [@vitejs/plugin-vue-jsx](packages/plugin-vue-jsx) | [![plugin-vue-jsx version](https://img.shields.io/npm/v/@vitejs/plugin-vue-jsx.svg?label=%20)](packages/plugin-vue-jsx/CHANGELOG.md) |
| [@vitejs/plugin-react-refresh](packages/plugin-react-refresh) | [![plugin-react-refresh version](https://img.shields.io/npm/v/@vitejs/plugin-react-refresh.svg?label=%20)](packages/plugin-react-refresh/CHANGELOG.md) |
| [@vitejs/plugin-legacy](packages/plugin-legacy) | [![plugin-legacy version](https://img.shields.io/npm/v/@vitejs/plugin-legacy.svg?label=%20)](packages/plugin-legacy/CHANGELOG.md) |
| [@vitejs/create-app](packages/create-app) | [![create-app version](https://img.shields.io/npm/v/@vitejs/create-app.svg?label=%20)](packages/create-app/CHANGELOG.md) |

## Contribution

See [Contributing Guide](https://github.com/vitejs/vite/tree/main/.github/contributing.md).
Expand All @@ -44,3 +65,5 @@ MIT
[unix-ci-url]: https://app.circleci.com/pipelines/github/vitejs/vite?branch=main
[windows-ci-img]: https://ci.appveyor.com/api/projects/status/0q4j8062olbcs71l/branch/main?svg=true
[windows-ci-url]: https://ci.appveyor.com/project/yyx990803/vite/branch/main
[discord-img]: https://img.shields.io/badge/chat-discord-blue?style=flat&logo=discord
[discord-url]: https://chat.vitejs.dev
37 changes: 27 additions & 10 deletions docs/.vitepress/config.js
Expand Up @@ -4,25 +4,30 @@
* @type {import('vitepress').UserConfig}
*/
module.exports = {
title: 'Vite',
title: 'Vite',
description: 'Next Generation Frontend Tooling',
head: [
[
'style',
{},
'img { border-radius: 10px }' + 'h1.title { margin-left: 0.5em }'
]
],
head: [['link', { rel: 'icon', type: 'image/svg+xml', href: '/logo.svg' }]],
themeConfig: {
repo: 'vitejs/vite',
logo: '/logo.svg',
docsDir: 'docs',
docsBranch: 'main',
editLinks: true,
editLinkText: 'Suggest changes to this page',

algolia: {
apiKey: 'b573aa848fd57fb47d693b531297403c',
indexName: 'vitejs'
},

carbonAds: {
carbon: 'CEBIEK3N',
placement: 'vitejsdev'
},

nav: [
{ text: 'Guide & APIs', link: '/guide/' },
{ text: 'Config Reference', link: '/config/' },
{ text: 'Guide', link: '/guide/' },
{ text: 'Config', link: '/config/' },
{ text: 'Plugins', link: '/plugins/' },
{
text: 'Changelog',
Expand Down Expand Up @@ -55,6 +60,10 @@ module.exports = {
text: 'Dependency Pre-Bundling',
link: '/guide/dep-pre-bundling'
},
{
text: 'Static Asset Handling',
link: '/guide/assets'
},
{
text: 'Building for Production',
link: '/guide/build'
Expand All @@ -63,6 +72,10 @@ module.exports = {
text: 'Env Variables and Modes',
link: '/guide/env-and-mode'
},
{
text: 'Server-Side Rendering (SSR)',
link: '/guide/ssr'
},
{
text: 'Backend Integration',
link: '/guide/backend-integration'
Expand Down Expand Up @@ -91,6 +104,10 @@ module.exports = {
{
text: 'JavaScript API',
link: '/guide/api-javascript'
},
{
text: 'Config Reference',
link: '/config/'
}
]
}
Expand Down
26 changes: 26 additions & 0 deletions docs/.vitepress/theme/custom.css
@@ -0,0 +1,26 @@
.home-hero .image {
width: 200px;
height: 200px;
}

.nav-bar .logo {
height: 30px;
margin-right: 2px;
}

.content img {
border-radius: 10px;
}

:root {
--c-brand: #646cff;
--c-brand-light: #747bff;
}

.custom-block.tip {
border-color: var(--c-brand-light);
}

.DocSearch {
--docsearch-primary-color: var(--c-brand) !important;
}
37 changes: 37 additions & 0 deletions docs/.vitepress/theme/index.js
@@ -0,0 +1,37 @@
import Theme from 'vitepress/theme'
import { h } from 'vue'
import sponsors from './sponsors.json'
import './sponsors.css'
import './custom.css'

export default {
...Theme,
Layout() {
return h(Theme.Layout, null, {
'sidebar-bottom': () =>
h('div', { class: 'sponsors' }, [
h(
'a',
{
href: 'https://github.com/sponsors/yyx990803',
target: '_blank',
rel: 'noopener'
},
[h('span', 'Sponsors')]
),
...sponsors.map(({ href, src, name }) =>
h(
'a',
{
href,
target: '_blank',
rel: 'noopener',
'aria-label': 'sponsor-img'
},
[h('img', { src, alt: name })]
)
)
])
})
}
}
28 changes: 28 additions & 0 deletions docs/.vitepress/theme/sponsors.css
@@ -0,0 +1,28 @@
.sponsors {
padding: 0 1.5rem 2rem;
font-size: 0.8rem;
}

.sponsors a {
color: #999;
}

.sponsors img {
width: 200px;
display: block;
margin: 1.25rem 0;
}

.sponsors.frontpage {
text-align: center;
}

.sponsors.frontpage img {
display: inline-block;
}

.sponsors.frontpage h2 {
color: #999;
font-size: 1.2rem;
border: none;
}
7 changes: 7 additions & 0 deletions docs/.vitepress/theme/sponsors.json
@@ -0,0 +1,7 @@
[
{
"name": "Tailwind Labs",
"href": "https://tailwindcss.com",
"src": "/tailwind-labs.svg"
}
]