build: upgrade to vite v8 (rolldown) and vitest v4#1853
Open
kissu wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I saw some ticket created here by @stvncode about a Vite 8 bump and decided to help a little (
normalprio +tinysize). 🤗Changelog
vite^7.3.2→^8.0.16vitest^3.2.4→^4.1.8@vitest/coverage-v8→^4.1.8@vitest/ui→^4.1.8Why
Vite 8 ships Rolldown (Rust bundler) as the default, which roughly halves the
production build phase (see table). The previous blocker —
vite-plugin-pwaVite-8support — is already resolved (1.3.0, the installed version).
Vitest 3 → 4 is required, not optional: vitest 3 peer-caps at vite
^7, whilevitest 4 supports
^8.@vitest/coverage-v8and@vitest/uimove with it to stay inlockstep. All seven
vite-plugin-*/@vitejsplugins already declare Vite 8 supportat their installed versions, so no plugin bumps were needed.
I used
tazeto bump the dependencies and checked manually on each projects to ensure the state + breaking changes, everything is clear. 👍🏻Moreover, vitest is going on its v5 soon hence the v4 was IMO safe given the small configuration + due.
Before / after (production build, Node 22.18.0)
✓ built in)yarn buildtotal (incl.vue-tsc)du -sh)Verifications
yarn build && yarn preview+ PWA activation -> I double-checked manually and everything works well (PWA registers well + the rest of the app just works perfectly fine)yarn test:run→ 176 passedNo new failures, the search one was already failing before and is currently not blocking anything either
yarn dev+ HMRNo crazy improvements here but that was to be expected, still sub second. 👍🏻
Notes
^20.19.0 || >=22.12.0; CI is already on 22.x.inlineDynamicImports option is deprecatedwarning originates fromvite-plugin-pwa's internal service-worker build under Rolldown — the SW stillbuilds and registers correctly. This is upstream for vite-plugin-pwa to resolve.
1.22.22following thepackageManagerversion in thepackage.jsonAka this part 👇🏻
@vueuse/corepure-comment and dynamic-vs-static import warnings areunchanged (Rolldown just rewords them).
PS: disclaimer regarding the OHF AI Policy: