Commit 4ae4453
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
File tree
- pages
- public
- renderer
- scripts
- src
- components
- dnd
- config
- context
- pages/dnd
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
This file was deleted.
0 commit comments