Update dependency vite to v3 - autoclosed
This MR contains the following updates:
Package | Change | Age | Adoption | Passing | Confidence |
---|---|---|---|---|---|
vite | 2.9.12 -> 3.0.0 |
Release Notes
vitejs/vite
v3.0.0
Main Changes
Vite 3 is out! Read the Vite 3 Annoucement blog post
- New docs theme using VitePress v1 alpha: https://vitejs.dev
- Vite CLI
- The default dev server port is now 5173, with the preview server starting at 4173.
- The default dev server host is now
localhost
instead of127.0.0.1
.
- Compatibility
- Vite no longer supports Node v12, which reached its EOL. Node 14.18+ is now required.
- Vite is now published as ESM, with a CJS proxy to the ESM entry for compatibility.
- The Modern Browser Baseline now targets browsers which support the native ES Modules and native ESM dynamic import and
import.meta
. - JS file extensions in SSR and lib mode now use a valid extension (
js
,mjs
, orcjs
) for output JS entries and chunks based on their format and the package type.
- Architecture changes
- Vite now avoids full reload during cold start when imports are injected by plugins in while crawling the initial statically imported modules (#8869).
- Vite uses ESM for the SSR build by default, and previous SSR externalization heuristics are no longer needed.
-
import.meta.glob
has been improved, read about the new features in the Glob Import Guide - The WebAssembly import API has been revised to avoid collisions with future standards. Read more in the WebAssembly guide
- Improved support for relative base.
- Experimental Features
- Build Advanced Base Options
- HMR Partial Accept
- Vite now allows the use of esbuild to optimize dependencies during build time avoiding the need of
@rollupjs/plugin-commonjs
, removing one of the difference id dependency handling between dev and prod.
- Bundle size reduction
- Terser is now an optional dependency. If you use
build.minify: 'terser'
, you'll need to install it (npm add -D terser
) - node-forge moved out of the monorepo to @vitejs/plugin-basic-ssl
- Terser is now an optional dependency. If you use
- Options that were already deprecated in v2 have been removed.
Note Before updating, check out the migration guide from v2
Features
- feat: expose server resolved urls (#8986) (26bcdc3), closes #8986
- feat: show ws connection error (#9007) (da7c3ae), closes #9007
- docs: update api-javascript (#8999) (05b17df), closes #8999
- refactor: opt-in optimizeDeps during build and SSR (#8965) (f8c8cf2), closes #8965
- refactor!: move basic ssl setup to external plugin, fix #8532 (#8961) (5c6cf5a), closes #8532 #8961
- feat: avoid scanner during build and only optimize CJS in SSR (#8932) (339d9e3), closes #8932
- feat: improved cold start using deps scanner (#8869) (188f188), closes #8869
- feat: ssr.optimizeDeps (#8917) (f280dd9), closes #8917
- feat: support import assertions (#8937) (2390422), closes #8937
- feat: accept AcceptedPlugin type for postcss plugin (#8830) (6886078), closes #8830
- feat: ssrBuild flag in config env (#8863) (b6d655a), closes #8863
- feat: experimental.renderBuiltUrl (revised build base options) (#8762) (895a7d6), closes #8762
- feat: respect esbuild minify config for css (#8811) (d90409e), closes #8811
- feat: use esbuild supported feature (#8665) (2061d41), closes #8665
- feat: respect esbuild minify config (#8754) (8b77695), closes #8754
- feat: update rollup commonjs plugin to v22 (#8743) (d4dcdd1), closes #8743
- feat: enable tree-shaking for lib es (#8737) (5dc0f72), closes #8737
- feat: supports cts and mts config (#8729) (c2b09db), closes #8729
- feat: bump minimum node version to 14.18.0 (#8662) (8a05432), closes #8662
- feat: experimental.buildAdvancedBaseOptions (#8450) (8ef7333), closes #8450
- feat: export esbuildVersion and rollupVersion (#8675) (15ebe1e), closes #8675
- feat: print resolved address for localhost (#8647) (eb52d36), closes #8647
- feat(hmr): experimental.hmrPartialAccept (#7324) (83dab7e), closes #7324
- refactor: type client maps (#8626) (cf87882), closes #8626
- feat: cleaner default dev output (#8638) (dbd9688), closes #8638
- feat: legacy options to revert to v2 strategies (#8623) (993b842), closes #8623
- feat: support async plugins (#8574) (caa8a58), closes #8574
- feat: support cjs noExternal in SSR dev, fix #2579 (#8430) (11d2191), closes #2579 #8430
- feat(dev): added assets to manifest (#6649) (cdf744d), closes #6649
- feat!: appType (spa, mpa, custom), boolean middlewareMode (#8452) (14db473), closes #8452
- feat: 500 response if the node proxy request fails (#7398) (73e1775), closes #7398
- feat: expose createFilter util (#8562) (c5c424a), closes #8562
- feat: better config
__dirname
support (#8442) (51e9195), closes #8442 - feat: expose
version
(#8456) (e992594), closes #8456 - feat: handle named imports of builtin modules (#8338) (e2e44ff), closes #8338
- feat: preserve process env vars in lib build (#8090) (908c9e4), closes #8090
- refactor!: make terser an optional dependency (#8049) (164f528), closes #8049
- chore: resolve ssr options (#8455) (d97e402), closes #8455
- perf: disable postcss sourcemap when unused (#8451) (64fc61c), closes #8451
- feat: add ssr.format to force esm output for ssr (#6812) (337b197), closes #6812
- feat: default esm SSR build, simplified externalization (#8348) (f8c92d1), closes #8348
- feat: derive proper js extension from package type (#8382) (95cdd81), closes #8382
- feat: ssr build using optimized deps (#8403) (6a5a5b5), closes #8403
- refactor:
ExportData.imports
toExportData.hasImports
(#8355) (168de2d), closes #8355 - feat: scan free dev server (#8319) (3f742b6), closes #8319
- feat: non-blocking esbuild optimization at build time (#8280) (909cf9c), closes #8280
- feat: non-blocking needs interop (#7568) (531cd7b), closes #7568
- refactor(cli): improve output aesthetics (#6997) (809ab47), closes #6997
- dx: sourcemap combine debug utils (#8307) (45dba50), closes #8307
- feat: sourcemap for importAnalysis (#8258) (a4e4d39), closes #8258
- feat: spa option,
preview
anddev
for MPA and SSR apps (#8217) (d7cba46), closes #8217 - feat: vite connected logs changed to console.debug (#7733) (9f00c41), closes #7733
- feat: worker support query url (#7914) (95297dd), closes #7914
- feat(wasm): new wasm plugin (
.wasm?init
) (#8219) (75c3bf6), closes #8219 - build!: bump targets (#8045) (66efd69), closes #8045
- feat!: migrate to ESM (#8178) (76fdc27), closes #8178
- feat!: relative base (#7644) (09648c2), closes #7644
- feat(css): warn if url rewrite has no importer (#8183) (0858450), closes #8183
- feat: allow any JS identifier in define, not ASCII-only (#5972) (95eb45b), closes #5972
- feat: enable
generatedCode: 'es2015'
for rollup build (#5018) (46d5e67), closes #5018 - feat: rework
dynamic-import-vars
(#7756) (80d113b), closes #7756 - feat: worker emit fileName with config (#7804) (04c2edd), closes #7804
- feat(glob-import): support
{ import: '*' }
(#8071) (0b78b2a), closes #8071 - build!: remove node v12 support (#7833) (eeac2d2), closes #7833
- feat!: rework
import.meta.glob
(#7537) (330e0a9), closes #7537 - feat!: vite dev default port is now 5173 (#8148) (1cc2e2d), closes #8148
- refactor: remove deprecated api for 3.0 (#5868) (b5c3709), closes #5868
- chore: stabilize experimental api (#7707) (b902932), closes #7707
- test: migrate to vitest (#8076) (8148f67), closes #8076
Bug Fixes
- fix: prevent production node_env in serve (#9066) (7662998), closes #9066
- fix: reload on restart with middleware mode (fixes #9038) (#9040) (e372693), closes #9038 #9040
- fix: remove ws is already closed error (#9041) (45b8b53), closes #9041
- fix(ssr): sourcemap content (fixes #8657) (#8997) (aff4544), closes #8657 #8997
- fix: respect explicitily external/noExternal config (#8983) (e369880), closes #8983
- fix: cjs interop export names local clash, fix #8950 (#8953) (2185f72), closes #8950 #8953
- fix: handle context resolve options (#8966) (57c6c15), closes #8966
- fix: re-encode url to prevent fs.allow bypass (fixes #8498) (#8979) (b835699), closes #8498 #8979
- fix(scan): detect import .ts as .js (#8969) (752af6c), closes #8969
- fix: ssrBuild is optional, avoid breaking VitePress (#8912) (722f514), closes #8912
- fix(css): always use css module content (#8936) (6e0dd3a), closes #8936
- fix: avoid optimizing non-optimizable external deps (#8860) (cd8d63b), closes #8860
- fix: ensure define overrides import.meta in build (#8892) (7d810a9), closes #8892
- fix: ignore Playwright test results directory (#8778) (314c09c), closes #8778
- fix: node platform for ssr dev regression (#8840) (7257fd8), closes #8840
- fix: optimize deps on dev SSR, builtin imports in node (#8854) (d49856c), closes #8854
- fix: prevent crash when the pad amount is negative (#8747) (3af6a1b), closes #8747
- fix: reverts #8278 (a0da2f0), closes #8278
- fix: server.force deprecation and force on restart API (#8842) (c94f564), closes #8842
- fix(deps): update all non-major dependencies (#8802) (a4a634d), closes #8802
- fix(hmr): set isSelfAccepting unless it is delayed (#8898) (ae34565), closes #8898
- fix(worker): dont throw on
import.meta.url
in ssr (#8846) (ef749ed), closes #8846 - fix: deps optimizer should wait on entries (#8822) (2db1b5b), closes #8822
- fix: incorrectly resolving
knownJsSrcRE
files from root (fixes #4161) (#8808) (e1e426e), closes #4161 #8808 - fix: /@fs/ dir traversal with escaped chars (fixes #8498) (#8804) (6851009), closes #8498 #8804
- fix: preserve extension of css assets in the manifest (#8768) (9508549), closes #8768
- fix: always remove temp config (#8782) (2c2a86b), closes #8782
- fix: ensure deps optimizer first run, fixes #8750 (#8775) (3f689a4), closes #8750 #8775
- fix: remove buildTimeImportMetaUrl (#8785) (cd32095), closes #8785
- fix: skip inline html (#8789) (4a6408b), closes #8789
- fix(optimizer): only run require-import conversion if require'd (#8795) (7ae0d3e), closes #8795
- perf: avoid sourcemap chains during dev (#8796) (1566f61), closes #8796
- perf(lib): improve helper inject regex (#8741) (19fc7e5), closes #8741
- fix: avoid type mismatch with Rollup (fix #7843) (#8701) (87e51f7), closes #7843 #8701
- fix: optimizeDeps.entries transformRequest url (fix #8719) (#8748) (9208c3b), closes #8719 #8748
- fix(hmr): HMR_PORT should not be
'undefined'
(#8761) (3271266), closes #8761 - fix: respect
rollupOptions.external
for transitive dependencies (#8679) (4f9097b), closes #8679 - fix: use esbuild platform browser/node instead of neutral (#8714) (a201cd4), closes #8714
- fix: disable inlineDynamicImports for ssr.target = node (#8641) (3b41a8e), closes #8641
- fix: infer hmr ws target by client location (#8650) (4061ee0), closes #8650
- fix: non-relative base public paths in CSS files (#8682) (d11d6ea), closes #8682
- fix: SSR with relative base (#8683) (c1667bb), closes #8683
- fix: filter of BOM tags in json plugin (#8628) (e10530b), closes #8628
- fix: revert #5902, fix #8243 (#8654) (1b820da), closes #8243 #8654
- fix(optimizer): use simple browser external shim in prod (#8630) (a32c4ba), closes #8630
- fix(server): skip localhost verbatim dns lookup (#8642) (7632247), closes #8642
- fix(wasm): support inlined WASM in Node < v16 (fix #8620) (#8622) (f586b14), closes #8620 #8622
- fix: allow cache overlap in parallel builds (#8592) (2dd0b49), closes #8592
- fix: avoid replacing defines and NODE_ENV in optimized deps (fix #8593) (#8606) (739175b), closes #8593 #8606
- fix: sequential injection of tags in transformIndexHtml (#5851) (#6901) (649c7f6), closes #5851 #6901
- fix(asset): respect assetFileNames if rollupOptions.output is an array (#8561) (4e6c26f), closes #8561
- fix(css): escape pattern chars from base path in postcss dir-dependency messages (#7081) (5151e74), closes #7081
- fix(optimizer): browser mapping for yarn pnp (#6493) (c1c7af3), closes #6493
- fix: add missed JPEG file extensions to
KNOWN_ASSET_TYPES
(#8565) (2dfc015), closes #8565 - fix: default export module transformation for vitest spy (#8567) (d357e33), closes #8567
- fix: default host to
localhost
instead of127.0.0.1
(#8543) (49c0896), closes #8543 - fix: dont handle sigterm in middleware mode (#8550) (c6f43dd), closes #8550
- fix: mime missing extensions (#8568) (acf3024), closes #8568
- fix: objurl for type module, and concurrent tests (#8541) (26ecd5a), closes #8541
- fix: outdated optimized dep removed from module graph (#8533) (3f4d22d), closes #8533
- fix(config): only rewrite .js loader in
loadConfigFromBundledFile
(#8556) (2548dd3), closes #8556 - fix(deps): update all non-major dependencies (#8558) (9a1fd4c), closes #8558
- fix(ssr): dont replace rollup input (#7275) (9a88afa), closes #7275
- fix: deps optimizer idle logic for workers (fix #8479) (#8511) (1e05548), closes #8479 #8511
- fix: not match \n when injecting esbuild helpers (#8414) (5a57626), closes #8414
- fix: respect optimize deps entries (#8489) (fba82d0), closes #8489
- fix(optimizer): encode
_
and.
in different way (#8508) (9065b37), closes #8508 - fix(optimizer): external require-import conversion (fixes #2492, #3409) (#8459) (1061bbd), closes #2492 #3409 #8459
- fix: make array
acornInjectPlugins
work (fixes #8410) (#8415) (08d594b), closes #8410 #8415 - fix: SSR deep imports externalization (fixes #8420) (#8421) (89d6711), closes #8420 #8421
- fix:
import.meta.accept()
->import.meta.hot.accept()
(#8361) (c5185cf), closes #8361 - fix: return type of
handleHMRUpdate
(#8367) (79d5ce1), closes #8367 - fix: sourcemap source point to null (#8299) (356b896), closes #8299
- fix: ssr-manifest no base (#8371) (37eb5b3), closes #8371
- fix(deps): update all non-major dependencies (#8391) (842f995), closes #8391
- fix: preserve annotations during build deps optimization (#8358) (334cd9f), closes #8358
- fix: missing types for
es-module-lexer
(fixes #8349) (#8352) (df2cc3d), closes #8349 #8352 - fix(optimizer): transpile before calling
transformGlobImport
(#8343) (1dbc7cc), closes #8343 - fix(deps): update all non-major dependencies (#8281) (c68db4d), closes #8281
- fix: expose client dist in
exports
(#8324) (689adc0), closes #8324 - fix(cjs): build cjs for
loadEnv
(#8305) (80dd2df), closes #8305 - fix: correctly replace process.env.NODE_ENV (#8283) (ec52baa), closes #8283
- fix: dev sourcemap (#8269) (505f75e), closes #8269
- fix: glob types (#8257) (03b227e), closes #8257
- fix: srcset handling in html (#6419) (a0ee4ff), closes #6419
- fix: support set NODE_ENV in scripts when custom mode option (#8218) (adcf041), closes #8218
- fix(hmr): catch thrown errors when connecting to hmr websocket (#7111) (4bc9284), closes #7111
- fix(plugin-legacy): respect
entryFileNames
for polyfill chunks (#8247) (baa9632), closes #8247 - fix(plugin-react): broken optimized deps dir check (#8255) (9e2a1ea), closes #8255
- fix!: do not fixStacktrace by default (#7995) (23f8e08), closes #7995
- fix(glob): properly handles tailing comma (#8181) (462be8e), closes #8181
- fix: add hash to lib chunk names (#7190) (c81cedf), closes #7190
- fix: allow css to be written for systemjs output (#5902) (780b4f5), closes #5902
- fix: client full reload (#8018) (2f478ed), closes #8018
- fix: handle optimize failure (#8006) (ba95a2a), closes #8006
- fix: increase default HTTPS dev server session memory limit (#6207) (f895f94), closes #6207
- fix: relative path html (#8122) (d0deac0), closes #8122
- fix: Remove ssrError when invalidating a module (#8124) (a543220), closes #8124
- fix: remove useless
/__vite_ping
handler (#8133) (d607b2b), closes #8133 - fix: typo in #8121 (#8143) (c32e3ac), closes #8121 #8143
- fix: use Vitest for unit testing, clean regex bug (#8040) (63cd53d), closes #8040
- fix: Vite cannot load configuration files in the link directory (#4180) (#4181) (a3fa1a3), closes #4180 #4181
- fix: vite client types (#7877) (0e67fe8), closes #7877
- fix: warn for unresolved css in html (#7911) (2b58cb3), closes #7911
- fix(build): use crossorigin for module preloaded (85cab70)
- fix(client): wait on the socket host, not the ping host (#6819) (ae56e47), closes #6819
- fix(css): hoist external @import for non-split css (#8022) (5280908), closes #8022
- fix(css): preserve dynamic import css code (fix #5348) (#7746) (12d0cc0), closes #5348 #7746
- fix(glob): wrap glob compile output in function invocation (#3682) (bb603d3), closes #3682
- fix(lib): enable inlineDynamicImports for umd and iife (#8126) (272a252), closes #8126
- fix(lib): use proper extension (#6827) (34df307), closes #6827
- fix(ssr): avoid transforming json file in ssrTransform (#6597) (a709440), closes #6597
- fix(lib)!: remove format prefixes for cjs and esm (#8107) (ad8c3b1), closes #8107
Previous Changelogs
3.0.0-beta.10 (2022-07-11)
3.0.0-beta.9 (2022-07-08)
3.0.0-beta.8 (2022-07-08)
3.0.0-beta.7 (2022-07-06)
3.0.0-beta.6 (2022-07-04)
3.0.0-beta.5 (2022-06-28)
3.0.0-beta.4 (2022-06-27)
3.0.0-beta.3 (2022-06-26)
3.0.0-beta.2 (2022-06-24)
3.0.0-beta.1 (2022-06-22)
3.0.0-beta.0 (2022-06-21)
3.0.0-alpha.14 (2022-06-20)
3.0.0-alpha.13 (2022-06-19)
3.0.0-alpha.12 (2022-06-16)
3.0.0-alpha.11 (2022-06-14)
3.0.0-alpha.10 (2022-06-10)
3.0.0-alpha.9 (2022-06-01)
3.0.0-alpha.8 (2022-05-31)
3.0.0-alpha.7 (2022-05-27)
3.0.0-alpha.6 (2022-05-27)
3.0.0-alpha.5 (2022-05-26)
3.0.0-alpha.4 (2022-05-25)
3.0.0-alpha.3 (2022-05-25)
3.0.0-alpha.2 (2022-05-23)
3.0.0-alpha.1 (2022-05-18)
3.0.0-alpha.0 (2022-05-13)
v2.9.14
- fix: re-encode url to prevent fs.allow bypass (fixes #8498) (#8990) (adb61c5), closes #8498 #8990
- fix: reverts #8471, fix css content (da77dee), closes #8874
- fix(css): preserve dynamic import css code (fixes #5348) (d4d89b9), closes #5348 #7746
- fix(css): always use css module content (#8977) (84ec02a), closes #8936 #8977
v2.9.13
Configuration
-
If you want to rebase/retry this MR, click this checkbox.
This MR has been generated by Renovate Bot.
Edited by igswsihw-wmadepbot