Skip to content

build: upgrade to vite v8 (rolldown) and vitest v4#1853

Open
kissu wants to merge 2 commits into
music-assistant:mainfrom
kissu:build/bump-vite-v8
Open

build: upgrade to vite v8 (rolldown) and vitest v4#1853
kissu wants to merge 2 commits into
music-assistant:mainfrom
kissu:build/bump-vite-v8

Conversation

@kissu

@kissu kissu commented Jun 3, 2026

Copy link
Copy Markdown

I saw some ticket created here by @stvncode about a Vite 8 bump and decided to help a little (normal prio + tiny size). 🤗

Changelog

  • vite ^7.3.2^8.0.16
  • vitest ^3.2.4^4.1.8
  • @vitest/coverage-v8^4.1.8
  • @vitest/ui^4.1.8

Why

Vite 8 ships Rolldown (Rust bundler) as the default, which roughly halves the
production build phase
(see table). The previous blocker — vite-plugin-pwa Vite-8
support — is already resolved (1.3.0, the installed version).

Vitest 3 → 4 is required, not optional: vitest 3 peer-caps at vite ^7, while
vitest 4 supports ^8. @vitest/coverage-v8 and @vitest/ui move with it to stay in
lockstep. All seven vite-plugin-* / @vitejs plugins already declare Vite 8 support
at their installed versions, so no plugin bumps were needed.

I used taze to 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.

CleanShot 2026-06-03 at 12 00 35@2x

Before / after (production build, Node 22.18.0)

Metric Vite 7.3.2 Vite 8.0.16
Vite build phase (✓ built in) 20.16s 10.05s (−50%)
yarn build total (incl. vue-tsc) 31.81s 20.55s (−35%)
Bundle (du -sh) 14M 14M
Largest chunk 3,408 kB 3,215 kB
PWA precache 172 / 7,177 KiB 174 / 6,865 KiB
dev cold-start 690 ms 627 ms

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)
CleanShot 2026-06-03 at 12 17 50@2x
  • 🟢 yarn test:run176 passed

No new failures, the search one was already failing before and is currently not blocking anything either

CleanShot 2026-06-03 at 12 05 56@2x
  • 🟢 yarn dev + HMR

No crazy improvements here but that was to be expected, still sub second. 👍🏻

Notes

  • Vite 8 requires Node ^20.19.0 || >=22.12.0; CI is already on 22.x.
  • The inlineDynamicImports option is deprecated warning originates from
    vite-plugin-pwa's internal service-worker build under Rolldown — the SW still
    builds and registers correctly. This is upstream for vite-plugin-pwa to resolve.
    • the lockfile was bumped with yarn 1.22.22 following the packageManager version in the package.json

Aka this part 👇🏻

CleanShot 2026-06-03 at 12 22 35@2x
  • Pre-existing @vueuse/core pure-comment and dynamic-vs-static import warnings are
    unchanged (Rolldown just rewords them).

PS: disclaimer regarding the OHF AI Policy:

  • Claude Code was used to speed 50% of the writing of this PR, I filled in the gaps + corrected a few metrics + added my personal touch to it 🤗
  • it was also used to speed up local troubleshooting but everything was carefully reviewed by me + cross-checked multiple times

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant