Update dependency vite to v5 - autoclosed
This MR contains the following updates:
Package | Change | Age | Adoption | Passing | Confidence |
---|---|---|---|---|---|
vite (source) | ^4.4.9 -> ^5.0.4 |
Release Notes
vitejs/vite (vite)
v5.0.4
- fix: bindCLIShortcuts to proper server (#15162) (67ac572), closes #15162
- fix: revert "fix: js fallback sourcemap content should be using original content (#15135)" (#15178) (d2a2493), closes #15135 #15178
- fix(define): allow define process.env (#15173) (ec401da), closes #15173
- fix(resolve): respect order of browser in mainFields when resolving (#15137) (4a111aa), closes #15137
- feat: preserve vite.middlewares connect instance after restarts (#15166) (9474c4b), closes #15166
- refactor: align with Promise.withResolvers() (#15171) (642f9bc), closes #15171
v5.0.3
- fix:
generateCodeFrame
infinite loop (#15093) (6619de7), closes #15093 - fix: js fallback sourcemap content should be using original content (#15135) (227d56d), closes #15135
- fix(css): render correct asset url when CSS chunk name is nested (#15154) (ef403c0), closes #15154
- fix(css): use non-nested chunk name if facadeModule is not CSS file (#15155) (811e392), closes #15155
- fix(dev): bind plugin context functions (#14569) (cb3243c), closes #14569
- chore(deps): update all non-major dependencies (#15145) (7ff2c0a), closes #15145
- build: handle latest json-stable-stringify replacement (#15049) (bcc4a61), closes #15049
v5.0.2
v5.0.1
- test: avoid read check when running as root (#14884) (1d9516c), closes #14884
- perf(hmr): skip traversed modules when checking circular imports (#15034) (41e437f), closes #15034
- fix: run htmlFallbackMiddleware for no accept header requests (#15025) (b93dfe3), closes #15025
- fix: update type CSSModulesOptions interface (#14987) (d0b2153), closes #14987
- fix(legacy): error in build with --watch and manifest enabled (#14450) (b9ee620), closes #14450
- chore: add comment about crossorigin attribute for script module (#15040) (03c371e), closes #15040
- chore: cleanup v5 beta changelog (#14694) (531d3cb), closes #14694
v5.0.0
Vite 5 is out! Read the announcement blog post here
Today, we mark another big milestone in Vite's path. The Vite team, contributors, and ecosystem partners, are excited to announce the release of Vite 5. Vite is now using Rollup 4, which already represents a big boost in build performance. And there are also new options to improve your dev server performance profile.
Vite 5 focuses on cleaning up the API (removing deprecated features) and streamlines several features closing long-standing issues, for example switching define
to use proper AST replacements instead of regexes. We also continue to take steps to future-proof Vite (Node.js 18+ is now required, and the CJS Node API has been deprecated).
Quick links:
Docs in other languages:
Learn more at the Vite 5 announcement blog post.
Breaking changes
- feat!: add isPreview to ConfigEnv and resolveConfig (#14855) (d195860), closes #14855
- fix(types)!: expose httpServer with Http2SecureServer union (#14834) (ab5bb40), closes #14834
- refactor(preview)!: use base middleware (#14818) (69737f4), closes #14818
- fix(html)!: align html serving between dev and preview (#14756) (4f71ae8), closes #14756
- refactor!: remove non boolean middleware mode (#14792) (deb5515), closes #14792
- refactor(esbuild)!: remove esbuild 0.17 -> 0.18 compat (#14804) (7234021), closes #14804
- feat(resolve)!: remove
resolve.browserField
(#14733) (43cc3b9), closes #14733 - refactor!: move side effect of restart server to the caller (#8746) (521ca58), closes #8746
- refactor(shortcuts)!: tweak shortcuts api (#14749) (0ae2e1d), closes #14749
- fix(resolve)!: remove special .mjs handling (#14723) (2141d31), closes #14723
- feat!: remove ssr proxy for externalized modules (#14521) (5786837), closes #14521
- feat(build)!: inline SVGs (#14643) (5acda5e), closes #14643
- fix!: worker.plugins is a function (#14685) (9d09dfe), closes #14685
- refactor!: remove https flag (#14681) (5b65bfd), closes #14681
- feat!: rollup v4 (#14508) (dee6067), closes #14508
- refactor!: remove
resolvePackageEntry
andresolvePackageData
APIs (#14584) (339f300), closes #14584 - refactor!: remove exporting internal APIs (#14583) (7861a33), closes #14583
- fix!: return 404 for resources requests outside the base path (#5657) (40fd2d9), closes #5657
- refactor!: remove
server.force
(#14530) (33ecfd9), closes #14530 - refactor!: remove jest condition (#14544) (8d18a91), closes #14544
- feat!: deprecate cjs node api (#14278) (404f30f), closes #14278
- feat(shortcuts)!: remove setRawMode (#14342) (536631a), closes #14342
- fix!: put manifest files in .vite directory by default (#14230) (74fa024), closes #14230
- feat!: allow path containing . to fallback to index.html (#14142) (1ae4cbd), closes #14142
- feat!: bump minimum node version to 18 (#14030) (2c1a45c), closes #14030
- fix!: avoid rewriting this (reverts #5312) (#14098) (9b7b4ed), closes #5312 #14098
- refactor!: merge
PreviewServerForHook
intoPreviewServer
type (#14119) (e0eb07c), closes #14119 - refactor(glob)!: remove
import.meta.globEager
(#14118) (fdfb61f), closes #14118 - feat!: add extension to internal virtual modules (#14231) (9594c70), closes #14231
- feat(css)!: remove css default export (b6c44cd)
- fix!: update node types peer dep range (#14280) (8f87e86), closes #14280
Features
- feat: allow providing parent httpServer on middleware mode (#14632) (e0c86d4), closes #14632
- style(client): overlay frame show scrollbar (#14701) (8aa4134), closes #14701
- feat: error when failed to resolve aliased import (#14973) (6a564fa), closes #14973
- feat: add invalid
rollupOptions
warnings (#14909) (7c240a0), closes #14909 - feat: skip initial clear screen if has logs (#14936) (a92bc61), closes #14936
- feat(hmr): add full reload reason (#14914) (60a020e), closes #14914
- feat(hmr): improve circular import updates (#14867) (b479055), closes #14867
- feat: implement AsyncDisposable (#14648) (385d580), closes #14648
- feat: expose parseAst and parseAstAsync from rollup (#14833) (6229485), closes #14833
- feat: upgrade rollup to 4.2.0 and use parseAstAsync (#14821) (86a5356), closes #14821
- feat(pluginContainer): implement watchChange hook (#14822) (9369d8d), closes #14822
- feat(server): add warmupRequest api (#14787) (8690581), closes #14787
- feat(define): handle replacement with esbuild (#11151) (e4c801c), closes #11151
- feat: add a runtime warning for the old object type transformIndexHtml hook (#14791) (17fb5ee), closes #14791
- feat: add server.warmup option (#14291) (da80372), closes #14291
- feat: add import-meta.d.ts (#14615) (598d423), closes #14615
- feat: add mdx as known js source (#14560) (dd213b5), closes #14560
- feat: add off method to ViteHotContext (issue #14185) (#14518) (31333bb), closes #14185 #14518
- feat: show better parse error in build (#14600) (84df7db), closes #14600
- feat(optimizer): check optimizeDeps.extensions for scannable files (#14543) (23ef8a1), closes #14543
- feat(ssr): support for ssr.resolve.conditions and ssr.resolve.externalConditions options (#14498) (d0afc39), closes #14498
- feat: show warning to discourage putting process/global to
define
option (#14447) (83a56f7), closes #14447 - feat(terser): add
maxWorkers
option for terserOptions (#13858) (884fc3d), closes #13858 - feat: add generic type for plugin api (#14238) (830b26e), closes #14238
- feat: allow passing down "null" to disable server watcher (#14208) (af5a95e), closes #14208
- feat: improve deno and bun support (#14379) (9884308), closes #14379
- feat: build.ssrEmitAssets out of experimental (#14055) (f88ab68), closes #14055
- feat: ssrTransform support import assertion by default (#14202) (70a379f), closes #14202
- feat: use
import.meta.url
instead ofself.location
(#14377) (e9b1e85), closes #14377 - feat: warn if # in project root (#14188) (f5ba696), closes #14188
- feat(css): stop injecting
?used
(fc05454) - feat: export
server.bindCLIShortcuts
(#13675) (1a2e5e6), closes #13675 - feat: copyPublicDir out of experimental (#14051) (443c235), closes #14051
- feat(css): build assets with the entry name when it is an entry point (#11578) (fd9a2cc), closes #11578
- feat(deps): upgrade rollup to 3.28.0 (#14049) (490dad8), closes #14049
- feat(worker): support a way to name the worker (#14032) (1f214a4), closes #14032
Performance
- perf(define): create simple regex for checks (#14788) (bd15537), closes #14788
- perf(hmr): implement soft invalidation (#14654) (4150bcb), closes #14654
- perf: pre transform requests while opening the browser (#12809) (96a4ce3), closes #12809
- chore(deps): update tsconfck to 3.0.0 (#14629) (4dcf9c4), closes #14629
- perf: reduce preload marker markup size (#14550) (6f12fd8), closes #14550
- perf: move up external url check before fs path checks (#13639) (c2ebea1), closes #13639
- refactor: update to tsconfck3 with lazy cache (#14234) (6e0b0ee), closes #14234
- perf: reduce one if judgment (#14329) (09ba7c6), closes #14329
- perf: replace startsWith with === (#14300) (75cd29c), closes #14300
- perf: replace fromEntries with a for loop (#14041) (8b174fd), closes #14041
- perf: use
URL.canParse
(#14068) (dcee6ef), closes #14068
Fixes
- fix: caret position was incorrect (#14984) (2b4e793), closes #14984
- fix: code frame was not generated for postcss errors (#14986) (bedfcfa), closes #14986
- fix: don't append
/@​fs/
for bare imports (#14995) (2a519a1), closes #14995 - fix: server.preTransformRequests https error (#14991) (#14993) (58ff849), closes #14991 #14993
- fix(ssr): skip esm proxy guard for namespace imports (#14988) (82a5b11), closes #14988
- fix: don't watch SPA fallback paths (#14953) (24c2c57), closes #14953
- fix: handle addWatchFile in load hooks (#14967) (a0ab85b), closes #14967
- fix: preload marker duplicate deps (#14955) (55335cc), closes #14955
- fix: relax overlay frame regex (#14979) (0b325bb), closes #14979
- fix(deps): update all non-major dependencies (#14961) (0bb3995), closes #14961
- fix(esbuild): set js loader for build transpile (#14980) (80beede), closes #14980
- fix(pluginContainer): run transform in this.load (#14965) (3f57b05), closes #14965
- fix:
server.headers
after restart in middleware mode (#14905) (f9ce9db), closes #14905 - fix: add watch in fallback file load (#14938) (b24b951), closes #14938
- fix: injectQuery check with double slash in the url (#14910) (84c5ff6), closes #14910
- fix(build): make build error message clearer (#14761) (350b4b2), closes #14761
- fix(css): correctly set manifest source name and emit CSS file (#14945) (28ccede), closes #14945
- fix(server): the server restart port should remain unchanged (#14418) (8b96e97), closes #14418
- fix(worker): prevent inject esm in classic workers (#14918) (2687dbb), closes #14918
- fix: file link in overlay with custom backend (#14879) (1bfb584), closes #14879
- fix: processNodeUrl for srcset (#14870) (0873bae), closes #14870
- fix: resovedUrls is null after server restart (#14890) (bd4d29f), closes #14890
- fix: use latest module graph in transform middleware (#14892) (b6b382c), closes #14892
- fix(assets): use base64 when inlining SVG with foreignObject tag (#14875) (9e20ed6), closes #14875
- fix(build): mixed external and transpiled srcset (#14888) (b5653d3), closes #14888
- fix(css): fix sourcemap warning in build with lightningCSS (#14871) (11b1796), closes #14871
- fix(css): initialize lightningCSS targets when not using options (#14872) (12f9230), closes #14872
- fix: use correct publicDir in ERR_LOAD_PUBLIC_URL (#14847) (66caef3), closes #14847
- fix(define): correctly replace same define values (#14786) (f36fcd2), closes #14786
- fix(deps): update all non-major dependencies (#14729) (d5d96e7), closes #14729
- fix(worker): force rollup to build workerImportMetaUrl under watch mode (#14712) (8db40ee), closes #14712
- fix: skip watchPackageDataPlugin for worker builds (#14762) (9babef5), closes #14762
- fix: suppress addWatchFile invalid phase error (#14751) (c3622d7), closes #14751
- fix(css): ensure code is valid after empty css chunk imports are removed (fix #14515) (#14517) (72f6a52), closes #14515 #14517
- fix(html): ignore rewrite external urls (#14774) (d6d1ef1), closes #14774
- fix(assets): fix svg inline in css url (#14714) (eef4aaa), closes #14714
- fix(resolve): make directory package.json check best effort (#14626) (d520388), closes #14626
- fix(assets): make timestamp invalidation lazy (#14675) (dd610b5), closes #14675
- fix(build): add crossorigin attribute to
link[rel="stylesheet"]
(#12991) (6e7b25c), closes #12991 - fix(hmr): clean importers in module graph when file is deleted (#14315) (7acb016), closes #14315
- fix(manifest): include assets referenced in html (#14657) (f627b91), closes #14657
- fix: avoid --open optimization if preTransformRequests is disabled (#14666) (d4f62e4), closes #14666
- fix(dynamic-import-vars): preserve custom query string (#14459) (1f2a982), closes #14459
- fix(hmr): add timestamp for assets in dev (#13371) (40ee245), closes #13371
- fix(html): srcset pointing image in public dir wasn't working during dev (#14663) (4496ae7), closes #14663
- fix(deps): update all non-major dependencies (#14635) (21017a9), closes #14635
- fix(esbuild): handle tsconfck cache undefined (#14650) (4e763c5), closes #14650
- fix: off-by-one bug in HTML whitespace removal (#14589) (f54e6d8), closes #14589
- fix(html): import expression in classic script for dev (#14595) (ea47b8f), closes #14595
- fix(html): inline style attribute not working in dev (#14592) (a4a17b8), closes #14592
- fix(html): relative paths without leading dot wasn't rewritten (#14591) (0a38e3b), closes #14591
- fix(proxy): correct the logic of bypass returning false (#14579) (261633a), closes #14579
- fix(optimizer): limit bundled file name length to 170 characters (#14561) (a3b6d8d), closes #14561
- fix: esbuild glob resolve error (#14533) (3615c68), closes #14533
- fix: update transform error message (#14139) (e0eb304), closes #14139
- fix(deps): update all non-major dependencies (#14510) (eb204fd), closes #14510
- fix(deps): update all non-major dependencies (#14559) (6868480), closes #14559
- fix(lib): esbuild helper functions injection not working with named exports (#14539) (5004d00), closes #14539
- fix: allow path ending with .html to fallback to index.html (dae6d0a)
- fix: handle fs.realpath.native MAX_PATH issue for Node.js <18.10 (#14487) (17c5928), closes #14487
- fix: update .html fallback in MPA (b5637a7)
- fix(analysis): warnings for dynamic imports that use static template literals (#14458) (ec7ee22), closes #14458
- fix(hmr): dev mode reduce unnecessary restart (#14426) (6f9d39d), closes #14426
- fix(import-analysis): preserve importedUrls import order (#14465) (99b0645), closes #14465
- fix(preview): allow path containing . to fallback to index.html (fddc151)
- fix(resolve): support submodules of optional peer deps (#14489) (f80ff77), closes #14489
- fix: handle errors during
hasWorkspacePackageJSON
function (#14394) (c3e4791), closes #14394 - fix: unify css collecting order (#11671) (20a8a15), closes #11671
- fix(deps): update all non-major dependencies (#14092) (68638f7), closes #14092
- fix(deps): update all non-major dependencies (#14460) (b77bff0), closes #14460
- fix(deps): update dependency dotenv-expand to v10 (#14391) (d6bde8b), closes #14391
- fix: omit 'plugins' since it has no effect (#13879) (64888b0), closes #13879
- fix: typo (#14334) (30df500), closes #14334
- fix: typo (#14337) (6ffe070), closes #14337
- fix: use relative path for sources field (#14247) (a995907), closes #14247
- fix(manifest): preserve pure css chunk assets (#14297) (4bf31e5), closes #14297
- fix(resolve): support
pkg?query
(21bbceb) - fix(sourcemap): dont inject fallback sourcemap if have existing (#14370) (55a3b4f), closes #14370
- fix(worker): inline es worker does not work in build mode (#14307) (7371c5c), closes #14307
- fix: add source map to Web Workers (fix #14216) (#14217) (6f86de3), closes #14216 #14217
- fix: handle sourcemap correctly when multiple line import exists (#14232) (627159d), closes #14232
- fix: include
vite/types/*
in exports field (#14296) (66a97be), closes #14296 - fix: use string manipulation instead of regex to inject esbuild helpers (#14094) (91a18c2), closes #14094
- fix(cli): convert special base (#14283) (34826aa), closes #14283
- fix(css): remove pure css chunk sourcemap (#14290) (2b80089), closes #14290
- fix(css): reset render cache on renderStart (#14326) (19bf0f1), closes #14326
- fix(css): spread lightningcss options (#14313) (80c6608), closes #14313
- fix(optimizer): define crawlDeps after scanProcessing and optimizationResult are complete (fix #1428 (c5f6558), closes #14284 #14285
- fix(vite): precisely check if files are in dirs (#14241) (245d186), closes #14241
- revert: "fix(css): spread lightningcss options (#14024)" (#14209) (5778365), closes #14024 #14209
- fix: breakpoints in JS not working (#13514) (0156bd2), closes #13514
- fix: if host is specified check whether it is valid (#14013) (c39e6c1), closes #14013
- fix: initWasm options should be optional (#14152) (387a6e8), closes #14152
- fix: rollup watch crash on Windows (#13339) (4f582c9), closes #13339
- fix: ws never connects after restarting server if server.hmr.server is set (#14127) (bd9b749), closes #14127
- fix(client): correctly display the config file name (#14160) (61e801d), closes #14160
- fix(css): spread lightningcss options (#14024) (63a4451), closes #14024
- fix(css): trim esbuild's minified css (#13893) (7682a62), closes #13893
- fix(glob): trigger HMR for glob in a package (#14117) (86cbf69), closes #14117
Cleanup
- docs: point links in messages at https: (#14992) (d3af879), closes #14992
- build: dont strip single line comments (#14969) (ea9ccb7), closes #14969
- build: strip internal parameters (1168e57)
- chore: refactor as functions (5684382)
- chore: add
PluginWithRequiredHook
type & extractgetHookHandler
function (#14845) (997f2d5), closes #14845 - chore(optimizedDeps): remove unused return (#14773) (9d744dd), closes #14773
- refactor: simplify build optimizer node_env handling (#14829) (275907b), closes #14829
- chore: fix typo (#14820) (eda1247), closes #14820
- chore: revert "feat: show warning to discourage putting process/global to
define
option (#14447)" (0426910), closes #14447 #14827 - chore: update license (#14790) (ac5d8a7), closes #14790
- chore(shortcuts): resolve generic type error (#14802) (a090742), closes #14802
- refactor: update es-module-lexer to 1.4.0 (#14937) (374e6fd), closes #14937
- chore(esbuild): fix typo (#14772) (6cfc1e2), closes #14772
- revert: remove AsyncDisposable (#14908) (b953b0d), closes #14908
- refactor(ssr): remove unused metadata code (#14711) (c5f2d60), closes #14711
- refactor: use dynamic import directly (#14661) (af60592), closes #14661
- chore(config): improve the readability of warning messages (#14594) (b43b4df), closes #14594
- build: clean generated type file (#14582) (fffe16e), closes #14582
- build: use rollup-plugin-dts (#14571) (d89725b), closes #14571
- refactor(css): make
getEmptyChunkReplacer
for unit test (#14528) (18900fd), closes #14528 - refactor: ensure HTML is stripped of generated blank lines (#14274) (bc97091), closes #14274
- refactor: remove unused record flatIdToExports (#14557) (7e62710), closes #14557
- test(ssr): add import and export ordering snapshot (#14468) (ca34c64), closes #14468
- refactor: remove CJS ssr output format (#13944) (2f60b9e), closes #13944
- refactor: replace duplicate code with tryStatSync (#14461) (be6b0c8), closes #14461
- refactor(config): remove unnecessary esbuild option (#13580) (67f4e52), closes #13580
- test(ssr): proper test coverage of SSR shebang import hoisting (#14448) (fdd4669), closes #14448
- chore(optimizer): debug info on cache dir handle process (#12858) (21a62da), closes #12858
- refactor(css): remove
export {}
(98fbdc3) - chore: fix ts error (#14053) (6cb397f), closes #14053
- chore: use "kB" everywhere with the correct definition (#14061) (f97ef58), closes #14061
- chore(client): remove redundant if statement (#14137) (fe1c0b9), closes #14137
- refactor(css): use
preliminaryFileName
to detect pure CSS chunks (#13974) (835249d), closes #13974
Previous Changelogs
5.0.0-beta.20 (2023-11-15)
5.0.0-beta.19 (2023-11-14)
5.0.0-beta.18 (2023-11-11)
5.0.0-beta.17 (2023-11-07)
5.0.0-beta.16 (2023-11-03)
5.0.0-beta.15 (2023-11-01)
5.0.0-beta.14 (2023-10-30)
5.0.0-beta.13 (2023-10-27)
5.0.0-beta.12 (2023-10-23)
5.0.0-beta.11 (2023-10-19)
5.0.0-beta.10 (2023-10-17)
5.0.0-beta.9 (2023-10-17)
5.0.0-beta.8 (2023-10-16)
5.0.0-beta.7 (2023-10-12)
5.0.0-beta.6 (2023-10-10)
5.0.0-beta.5 (2023-10-09)
5.0.0-beta.4 (2023-10-02)
5.0.0-beta.3 (2023-09-25)
5.0.0-beta.2 (2023-09-15)
5.0.0-beta.1 (2023-09-08)
5.0.0-beta.0 (2023-08-24)
v4.5.0
- feat: backport mdx as known js source (#14560) (#14670) (45595ef), closes #14560 #14670
- feat: scan .marko files (#14669) (ed7bdc5), closes #14669
- feat(ssr): backport ssr.resolve.conditions and ssr.resolve.externalConditions (#14498) (#14668) (520139c), closes #14498 #14668
v4.4.11
- revert: "fix: use string manipulation instead of regex to inject esbuild helpers (54e1275), closes #14094
v4.4.10
- fix: add source map to Web Workers (fix #14216) (#14217) (df6f32f), closes #14216 #14217
- fix: handle errors during
hasWorkspacePackageJSON
function (#14394) (6f6e5de), closes #14394 - fix: handle sourcemap correctly when multiple line import exists (#14232) (218861f), closes #14232
- fix: if host is specified check whether it is valid (#14013) (b1b816a), closes #14013
- fix: include
vite/types/*
in exports field (#14296) (40e99a1), closes #14296 - fix: initWasm options should be optional (#14152) (119c074), closes #14152
- fix: restore builtins list (f8b9adb)
- fix: use string manipulation instead of regex to inject esbuild helpers (#14094) (128ad8f), closes #14094
- fix: ws never connects after restarting server if server.hmr.server is set (#14127) (441642e), closes #14127
- fix(analysis): warnings for dynamic imports that use static template literals (#14458) (0c6d289), closes #14458
- fix(cli): convert special base (#14283) (d4bc0fb), closes #14283
- fix(css): remove pure css chunk sourcemap (#14290) (cd7e033), closes #14290
- fix(css): reset render cache on renderStart (#14326) (d334b3d), closes #14326
- fix(glob): trigger HMR for glob in a package (#14117) (0f582bf), closes #14117
- fix(import-analysis): preserve importedUrls import order (#14465) (269aa43), closes #14465
- fix(manifest): preserve pure css chunk assets (#14297) (3d63ae6), closes #14297
- fix(optimizer): define crawlDeps after scanProcessing and optimizationResult are complete (fix #1428 (fcaf749), closes #14284 #14285
- fix(resolve): support submodules of optional peer deps (#14489) (104971d), closes #14489
- fix(vite): precisely check if files are in dirs (#14241) (c4758d1), closes #14241
- feat: improve deno and bun support (#14379) (8bc1f9d), closes #14379
Configuration
-
If you want to rebase/retry this MR, check this box
This MR has been generated by Renovate Bot.