chore(deps-dev): vite 5 → 8 + @vitejs/plugin-react 4 → 6 - #212
Merged
Conversation
This was referenced Aug 2, 2026
Supersedes #138 and #139, which are coupled (plugin-react 6 requires vite 7+) and were deferred in June because `vite build` failed with `Rolldown failed to resolve import "openai"` — vite 8 swaps in the rolldown bundler, and the renderer was transitively pulling core/dist/providers/deepseek.js. That blocker is gone: #192 split dependency-free model metadata from the provider implementation specifically so provider/OpenAI SDK code is absent from renderer bundles. The import rolldown could not resolve no longer reaches the renderer graph, so no `build.rolldownOptions.external` migration is needed. Also replaces `__dirname` with `import.meta.dirname` in vite.config.ts. vite 8 warns that `__dirname` is unsupported by `configLoader: 'native'`, which is planned to become the default in a future major. The repo requires Node >=22, so `import.meta.dirname` is available. Verified on top of React 19 (#211), forced rebuild throughout: - tsc -b --force, lint (--max-warnings=0), format:check: clean - 1033 tests across 8 packages: pass - pnpm build + full build:tauri-assets pipeline: pass (app-server.cjs 599,395 bytes — within the 768 KiB #208 budget) - desktop Playwright protocol journey (4 tests): pass Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Supersedes #138 and #139. Stacked on #211 (React 19) — merge that first.
Why these were deferred, and why they're unblocked now
#138 and #139 are coupled (plugin-react 6 requires vite 7+) and were deferred back in June for a concrete reason: vite 8 replaces esbuild/rollup with rolldown, and
vite buildfailed withtraced to
core/dist/providers/deepseek.jsbeing pulled into the renderer graph. The suggested fix at the time was abuild.rolldownOptions.externalmigration plus Tauri runtime verification — real work with real risk, so it was correctly parked.That blocker no longer exists. #192 split dependency-free model metadata out of the provider implementation specifically so provider and OpenAI SDK code stay out of renderer bundles. The import rolldown couldn't resolve simply isn't in the renderer graph anymore. No
rolldownOptionsmigration needed — the build is clean as-is.This is a nice second-order payoff from the thin-client work in #180–#210.
Also included
__dirname→import.meta.dirnameinvite.config.ts. vite 8 emits:Only a warning today, but it's a one-line fix and the repo requires Node >=22, so
import.meta.dirnameis safely available. Better to clear it now than to hit it as a hard failure on the next major.Verification
On top of #211, everything with a forced rebuild (
tsc -b --force) — incrementaltsc -bsilently skips the desktop project and masks exactly this class of failure, which is how the React 19 breakage initially slipped past me:tsc -b --force,pnpm lint(--max-warnings=0),pnpm format:check— cleanpnpm test— 1033 tests across 8 packages passpnpm build— cleanpnpm --filter @deepcode/desktop build:tauri-assets— full desktop pipeline: renderer built, app-server sidecar at 599,395 bytes (within the 768 KiB budget from ci: enforce app-server release gates #208), Node runtime staged and thinnedpnpm --filter @deepcode/desktop test:e2e— desktop Playwright protocol journey, 4/4 passI ran the whole
build:tauri-assetspipeline rather than justvite build, since a bundler swap is exactly the change that can produce a valid-lookingdist/that Tauri then can't package. Output lands inapps/desktop/distastauri.conf.json'sfrontendDist: "../dist"expects — vite 8 only displays the path differently (relative to cwd rather than toroot), which is worth knowing before it reads as a regression.🤖 Generated with Claude Code