Skip to content

Commit 4ae4453

Browse files
fezcodeclaude
andcommitted
build: migrate from CRA/react-snap to Vite + Vike
The old react-snap toolchain bundled a 2019-era Chromium that crashes on Windows 11 with ERROR_TIMEOUT (1460), making production builds unusable. Replace the entire toolchain with Vite + Vike while keeping react-router v7. - Vite dev/build/preview replaces craco start/build and vite preview - Vike renderer (renderer/+onRenderHtml, +onRenderClient, +config) hosts BrowserRouter/StaticRouter around a client-only Page so no SSR audit was needed across 573 source files - pages/+route.js catch-all ('/*') delegates routing to react-router - Vike prerender with onBeforePrerenderStart emits 140 static-route HTML files; post-build.mjs copies index.html to 404.html for SPA fallback - Vitest replaces Jest via craco test; jsdom environment, setupTests reused - Tailwind/PostCSS retained; config converted to ESM (tailwind.config.mjs, src/config/colors.js + fonts.js default-exported) to satisfy Rollup - 13 process.env.PUBLIC_URL sites collapsed to '' (homepage is root) - src/App.jsx drops its BrowserRouter wrapper (renderer owns it) - src/version.js swaps require() for import (Vite/ESM) - public/index.html removed; its head content is generated by onRenderHtml - Removed react-scripts, react-snap, @craco/craco, craco.config.js Deploy target moves from build/ to dist/client/. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent ea52560 commit 4ae4453

35 files changed

Lines changed: 10261 additions & 19432 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
# production
1212
/build
13+
/dist
1314

1415
# ai
1516
.gemini

craco.config.js

Lines changed: 0 additions & 45 deletions
This file was deleted.

0 commit comments

Comments
 (0)