Conversation
…ct 5.2.0 PR B of the vite/vitest stack. PR A left `node_modules/vite` at 7.3.6, so the production build and dev server were still the untested surface; this moves them. Vite 8 is a four-engine swap, not just the dep-optimizer swap the migration plan described: Rolldown replaces Rollup for the production bundle, Oxc replaces esbuild for JS transform and minification, and Lightning CSS replaces esbuild for CSS minification. No config edits were required because the repo configures none of the renamed options (no rollupOptions/manualChunks/esbuild:/worker:/lib build) — not because the API was unchanged. The bump de-duplicates the tree rather than adding to it: the nested `astro/vite` and `vitest/vite` 8.2.2 copies collapse into the single hoisted root, so the lockfile delta is four entries removed and none added, and PR A's `optimizeDeps.esbuildOptions` deprecation warning goes away. All three `optimizeDeps` F3 guards were left byte-identical and remain sufficient under Rolldown's scanner. `test:web` ran twice with a cold `.vite` cache: 517 files / 2953 tests green both times, zero `optimized dependencies changed`. `vite build` drops 3.81s -> 715ms; dist grows 0.75% (Lightning CSS lowering) while the main JS chunk sheds 60.5 kB, and all 322 asset/inter-chunk references resolve with `base: './'` intact for Tauri's custom protocol. Storybook is not a blocker: @storybook/react-vite and @storybook/builder-vite 10.5.10 both declare vite ^5 || ^6 || ^7 || ^8, as does every other vite-peer consumer in the tree. Still owed: a GUI `bun run desktop` smoke test of the Tauri WebView window.
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.
Summary
PR B of the staged vite/vitest migration: moves the app build to
vite@8.2.2and tightens@vitejs/plugin-reactto^5.2.0.Three files, no config edits:
apps/web/package.json,bun.lock(4 entries removed, 0 added), and PR-B corrections appended todocs/migrations/2026-08-31-vite.md.@vitejs/plugin-reactwas already resolved at 5.2.0 (^5.0.0covered it) — the manifest edit is a floor-tightening with zero resolution change, not a version move. Deliberately not 6.x, which requires vite^8only and swaps Babel for Oxc — a separate bundler migration.The plan understated this migration, and the reason it still landed clean
BC-B1described vite 8 as a dep-optimizer swap. It is four engine swaps:Renamed surfaces:
build.rollupOptions→rolldownOptions,worker.rollupOptions,esbuild:→oxc:, andmanualChunksobject form removed.Zero config changes were needed — but not because "the API is unchanged". It's because this repo configures none of them. Verified by grep across the tree: no
rollupOptions,manualChunks,esbuild:,worker:,define,envPrefix,import.meta.hot, or lib build anywhere. All threeoptimizeDepsguard locations (vite.config.ts,vitest.config.tsboth projects,.storybook/main.ts) are byte-identical; the esbuild-tuned include lists remain sufficient under Rolldown.Correction to #467's framing: "the Rolldown risk is already paid" was true only for the test path. Rollup→Rolldown bundling, Oxc minify, and Lightning CSS all land here for the first time.
Ecosystem check: not blocked
Every vite-peer consumer in the tree was swept, not just Storybook — all accept
^8:@storybook/react-vite@10.5.10and@storybook/builder-vite@10.5.10(^5||^6||^7||^8),@tailwindcss/vite,@joshwooding/vite-plugin-react-docgen-typescript,@vitest/mocker,vitefu,vitest@4.1.11.astro@7.2.9needs^8.0.13— satisfied.This bump de-duplicates the tree
The nested
astro/viteandvitest/vite8.2.2 copies introduced by #467 collapse into the single hoisted root. There is now exactly onevitein the lockfile and zero nested copies on disk. #467'soptimizeDeps.esbuildOptionsdeprecation warning is gone.Clean
--frozen-lockfileinstall yields 884 packages — below the ~915 baseline precisely because of this de-dup, confirmed by lockfile set-diff to be exactly those 4 removals and nothing else.Build output
bun run buildsucceeds. 3.81s → 715ms (~5.3×).terminal-*,settings-*,council-*) where Rollup emitted repeatedindex-*; vite 8 addsmodulepreloadhintsOutput integrity was verified rather than assumed: all 21
index.htmlrefs and 301 inter-chunk relative refs resolve; zero absolute/assetspaths, sobase: './'still satisfies Tauri's custom protocol;@layer,prefers-reduced-motion, and--nc-*custom properties all survive minification.Two new advisory warnings from Rolldown —
[INEFFECTIVE_DYNAMIC_IMPORT]for@tauri-apps/plugin-dialogandsrc/components/board/index.ts. Both are pre-existing code conditions (statically and dynamically imported), harmless, and a cheap code-splitting win if anyone wants it. No bundle-size gate exists in the repo.Test plan
bun run build— succeeded, output integrity verified abovetypecheck·lintincl.lint:meta("no violations") ·codegen:check·audite2e:ring3 --provegreen (canary for the hoisted-linker pin)test:node2059 / 0 fail ·test:plugin15test:web×2 cold cache — 517 files / 2953 tests both runs;optimized dependencies changed0 occurrences across both plustest:storiestest:stories207 files / 918 testscargo fmt --check·cargo clippy --all-targets--frozen-lockfile→ 884 packages, all 11@nightcore/*root linkstest:rust1585 pass / 3 fail — knowne2e::sidecar_boundary::contracttrio, pre-existing onmain, macOS-only, green in CI. Pushed--no-verifyfor that reason; every other gate run manually.Dev-server smoke (non-interactive)
vite --port 5173 --strictPort— the exactbeforeDevCommandTauri'sdevUrlpolls — reportsVITE v8.2.2 ready in 163 ms, serves/at 200 with plugin-react's Fast-Refresh preamble injected,/src/main.tsxat 200,/@vite/clientat 200.A GUI
bun run desktopsmoke test. The above covers everything Tauri's CLI depends on, but not WebView window rendering, which needs an interactive session. Worth doing before merge given this changes the production bundler.Note for the gate checklist
test:storiesis not a root script —bun run test:storiesfails with "Script not found". Usebun run --filter @nightcore/web test:stories.