chore(deps): bump vite to 8.x + plugin-react 6 + vitest 4.1 + esbuild 0.28#969
chore(deps): bump vite to 8.x + plugin-react 6 + vitest 4.1 + esbuild 0.28#969jSydorowicz21 wants to merge 2 commits intoRunMaestro:rcfrom
Conversation
… 0.28
Stage 6 of the package-upgrade plan. Two Vite 8 behavior shifts surface
and are addressed surgically.
- vite ^5.0.11 -> ^8.0.11
- @vitejs/plugin-react ^4.2.1 -> ^6.0.1 (sync, vite 8 peer)
- vitest ^4.0.15 -> ^4.1.5 (sync, latest 4.x line - no v5 yet)
- @vitest/coverage-v8 ^4.0.15 -> ^4.1.5 (sync)
- esbuild ^0.24.2 -> ^0.28.0 (sync, vite 8 peer)
- removed vite-plugin-electron ^0.28.2 (never imported - confirmed by grep)
Vite 8 behavior shifts addressed in vite.config.{mts,web.mts}:
1) Default CSS minifier flipped to lightningcss, which rejects malformed
CSS that esbuild's minifier tolerated. xterm's CSS includes one such
pattern. Pinned cssMinify: 'esbuild' to preserve prior behavior.
2) Rolldown uses oxc as the transformer; existing esbuild.drop config
was silently ignored, leaking source console.* calls into prod
bundles. Migrated to oxc.drop with the same intent. Verified by
grepping production output - source console.log strings (e.g.
"AgentSessionsModal: No activeSession") are now stripped.
Verification:
- npm install + electron-rebuild against E28 succeeded
- npm run lint clean (3 tsconfigs)
- npm run lint:eslint clean
- npm run format:check (src/) clean
- npm run build succeeded under Vite 8 / Rolldown
- Targeted vitest 4.1.5 run on Vite 8: 74 tests passed
Two small follow-ups to Stage 6's vite.config edits, surfaced by code
review:
1. Removed `oxc.jsxRefresh` from vite.config.mts. The renderer config
passes `react({ fastRefresh: !disableHmr })` to @vitejs/plugin-react,
which owns Fast Refresh injection; an oxc-level toggle alongside is
redundant and could double-inject. The web config never had this
line; the renderer-only setting was an asymmetry without rationale.
2. Added a TODO(vite-css) comment beside both `cssMinify: 'esbuild'`
pins, naming the three exit criteria for revisiting (lightningcss
tolerance update, xterm CSS upstream fix, or local pre-processing).
The pin works around xterm's malformed CSS that Rolldown's
lightningcss minifier rejects but esbuild silently passed through.
No behavior change.
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis PR upgrades development dependencies to Vite 8 with Rolldown and migrates build configurations accordingly. Vite, Vitest, esbuild, and related plugins are bumped to newer major/minor versions. Both ChangesVite 8 & Rolldown Migration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR bumps Vite from 5 to 8 (via Rolldown/Oxc) and syncs peer dependencies (
Confidence Score: 3/5The renderer config migration looks structurally sound, but the web config retains a deprecated minifier and the oxc.drop mechanism is unverified against Vite 8 type definitions, which could mean console calls silently leak into production web bundles. The renderer config migration looks structurally sound, but the web config retains a deprecated minifier and the oxc.drop mechanism is unverified — two open questions that could mean console calls silently leak into production web bundles. vite.config.web.mts — the deprecated build.minify: 'esbuild' and its interaction with oxc.drop need attention before this lands on the rc branch. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
SRC[Source Files\nTS / TSX / CSS]
subgraph renderer[Vite 8 Build Pipeline renderer vite.config.mts]
OXC_T1[Oxc Transformer\noxc.drop: console+debugger\njsx: @vitejs/plugin-react]
ROLL1[Rolldown Bundler]
MIN1[Oxc Minifier\nbuild.minify: oxc default]
CSS1[CSS Minifier\ncssMinify: esbuild\nxterm compat pin]
end
subgraph web[Vite 8 Build Pipeline web vite.config.web.mts]
OXC_T2[Oxc Transformer\noxc.drop: console+debugger\njsx: @vitejs/plugin-react]
ROLL2[Rolldown Bundler]
MIN2[esbuild Minifier\nbuild.minify: esbuild DEPRECATED]
CSS2[CSS Minifier\ncssMinify: esbuild\nxterm compat pin]
end
SRC --> OXC_T1 --> ROLL1 --> MIN1 --> CSS1 --> OUT1[dist/renderer]
SRC --> OXC_T2 --> ROLL2 --> MIN2 --> CSS2 --> OUT2[dist/web]
|
| oxc: { | ||
| drop: mode === 'production' ? ['console', 'debugger'] : [], | ||
| }, |
There was a problem hiding this comment.
oxc.drop is not a documented Vite 8 OxcOptions field
The official Vite 8 docs for oxc say it "extends Oxc Transformer's options," whose published fields are jsx, target, typescript, assumptions, define, inject, decorator, and plugins — no drop. Neither the rolldown-vite maintainers (as of July 2025) nor the oxc-transform docs list a drop option for the transformer. An unrecognized key in OxcOptions may be silently ignored, leaving production console calls unstripped even though the build succeeds. It is worth confirming via TypeScript types (npx tsc --noEmit) that oxc.drop is actually a valid key in the installed Vite 8 type definitions, and that the grep verification covers the web build output as well.
Summary
Vite major bump from a planned package-upgrade pass. Surfaces and addresses two real Vite 8 / Rolldown behavior shifts.
vite^5.0.11→^8.0.11(3 majors)@vitejs/plugin-react^4.2.1→^6.0.1(sync, vite 8 peer)vitest^4.0.15→^4.1.5(sync, latest 4.x; no v5 yet)@vitest/coverage-v8^4.0.15→^4.1.5(sync)esbuild^0.24.2→^0.28.0(sync, vite 8 peer)vite-plugin-electron^0.28.2— verified zero imports in sourceBehavior shifts addressed in
vite.config.{mts,web.mts}cssMinify: 'esbuild'pinned. Vite 8 changed the default CSS minifier to lightningcss, which strictly rejects xterm's intentionally-malformed selectors that esbuild's minifier silently passed through. ATODO(vite-css)comment beside each pin names three exit criteria (lightningcss tolerance, xterm upstream fix, or local pre-processing).esbuild.drop→oxc.drop. Vite 8 with Rolldown usesoxcas the transformer; the legacyesbuildconfig block is silently ignored. Without this migration, sourceconsole.*calls leak into production bundles. Verified by grepping production output before/after — known sourceconsole.logstrings (e.g."AgentSessionsModal: No activeSession") are correctly stripped after the migration.JSX Fast Refresh stays handled by
react({ fastRefresh: !disableHmr })from@vitejs/plugin-react; no separate oxc-level toggle is needed (would double-inject).Verification
npm run lintcleannpm run lint:eslintcleannpm run format:check(src/) cleannpm run buildclean under Vite 8 / Rolldown/tmpext4 worktree: 775 files pass, 0 fail, 27,356 tests pass when stacked on chore(tests): dedup repeated import type Session lines in 4 files #965Merge ordering
⚠ Land after #965 (
chore/dedup-test-imports). This branch bumpsvitestto 4.1.x which has a stricter parser; without the dedup branch, 4 test files silently report(0 test).Test plan
htoporvimSummary by CodeRabbit
Release Notes