In this minor, we focused on improving the dev server performance. The resolve logic got streamlined, improving hot paths and implementing smarter caching for finding package.json, TS config files, and resolved URL in general.
You can read a detailed walkthrough of the performance work done in this blog post by one of Vite Contributors: How we made Vite 4.3 faaaaster 🚀.
This sprint resulted in speed improvements across the board compared to Vite 4.2.
These are the performance improvements as measured by sapphi-red/performance-compare, which tests an app with 1000 React Components cold and warm dev server startup time as well as HMR times for a root and a leaf component:
Vite (babel)
Vite 4.2
Vite 4.3
Improvement
dev cold start
17249.0ms
5132.4ms
-70.2%
dev warm start
6027.8ms
4536.1ms
-24.7%
Root HMR
46.8ms
26.7ms
-42.9%
Leaf HMR
27.0ms
12.9ms
-52.2%
Vite (swc)
Vite 4.2
Vite 4.3
Improvement
dev cold start
13552.5ms
3201.0ms
-76.4%
dev warm start
4625.5ms
2834.4ms
-38.7%
Root HMR
30.5ms
24.0ms
-21.3%
Leaf HMR
16.9ms
10.0ms
-40.8%
You can read more information about the benchmark here
Features
feat: expose isFileServingAllowed as public utility (#12894) (93e095c), closes #12894
feat: reuse existing style elements in dev (#12678) (3a41bd8), closes #12678
feat: skip pinging the server when the tab is not shown (#12698) (bedcd8f), closes #12698
feat(create-vite): use typescript 5.0 in templates (#12481) (8582e2d), closes #12481
feat: use preview server parameter in preview server hook (#11647) (4c142ea), closes #11647
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps vite from 4.2.1 to 4.3.1.
Release notes
Sourced from vite's releases.
Changelog
Sourced from vite's changelog.
... (truncated)
Commits
2a8779c
release: v4.3.19cc93a5
fix: revert ensure module in graph before transforming (#12774) (#12929)f29c582
docs: 4.3 announcement and release notes (#12925)55ec023
chore: clean up 4.3 changelogd6468a3
release: v4.3.0251d0ab
fix(build): do not repeatedly output warning message (#12910)3334660
release: v4.3.0-beta.8a0e10d5
fix: yarn pnp considerBuiltins (#12903)62ebe28
refactor(eslint): migrate toeslint-plugin-n
(#12895)93e095c
feat: exposeisFileServingAllowed
as public utility (#12894)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)