Skip to content

chore(deps-dev): vite 5 → 8 + @vitejs/plugin-react 4 → 6 - #212

Merged
oratis merged 1 commit into
mainfrom
deps/vite-8
Aug 2, 2026
Merged

chore(deps-dev): vite 5 → 8 + @vitejs/plugin-react 4 → 6#212
oratis merged 1 commit into
mainfrom
deps/vite-8

Conversation

@oratis

@oratis oratis commented Aug 2, 2026

Copy link
Copy Markdown
Owner

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 build failed with

Rolldown failed to resolve import "openai"

traced to core/dist/providers/deepseek.js being pulled into the renderer graph. The suggested fix at the time was a build.rolldownOptions.external migration 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 rolldownOptions migration needed — the build is clean as-is.

This is a nice second-order payoff from the thin-client work in #180#210.

Also included

__dirnameimport.meta.dirname in vite.config.ts. vite 8 emits:

Your Vite config uses features that are unsupported by configLoader: 'native', which is planned to become the default in a future major version of Vite

Only a warning today, but it's a one-line fix and the repo requires Node >=22, so import.meta.dirname is 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) — incremental tsc -b silently 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 — clean
  • pnpm test1033 tests across 8 packages pass
  • pnpm build — clean
  • pnpm --filter @deepcode/desktop build:tauri-assetsfull 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 thinned
  • pnpm --filter @deepcode/desktop test:e2edesktop Playwright protocol journey, 4/4 pass

I ran the whole build:tauri-assets pipeline rather than just vite build, since a bundler swap is exactly the change that can produce a valid-looking dist/ that Tauri then can't package. Output lands in apps/desktop/dist as tauri.conf.json's frontendDist: "../dist" expects — vite 8 only displays the path differently (relative to cwd rather than to root), which is worth knowing before it reads as a regression.

🤖 Generated with Claude Code

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>
@oratis
oratis merged commit 71d7346 into main Aug 2, 2026
5 checks passed
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