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)
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/Jogiter/jogiter.github.com/network/alerts).
Bumps vite from 2.8.5 to 2.9.15.
Changelog
Sourced from vite's changelog.
... (truncated)
Commits
3a5543d
release: v2.9.15521bb39
fix: fs serve only edit pathname (fixes #9148) (#9654)ed8d6a7
chore: narrow down rollup version (#9651)e361a80
fix(ssr-manifest): check name before saving to ssrManifest (#9595)7f01a00
fix: backport makeresolveConfig()
concurrent safe (#9224) (#9229)0d13630
release: v2.9.14adb61c5
fix: backport #8979, re-encode url to prevent fs.allow bypass (fixes #8498) (...84ec02a
fix(css): backport #8936 (#8977)d4d89b9
fix(css): backport #7746da77dee
fix: reverts #8471Dependabot 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) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/Jogiter/jogiter.github.com/network/alerts).