mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
The existing Next.js app (99 pages, 427 next/* imports, 177 files using
next/router, 154 using nextjs-routes types, 105 using getServerSideProps) is
far too coupled to rewrite in one pass. A full migration is ~2–4 weeks of
mechanical work.
This commit adds the scaffold only:
vite/package.json — Vite 8 + React 19.2 + wouter, no Next deps
vite/vite.config.ts — aliases at ../lib, ../ui, ../configs, … so source
migrates file-by-file instead of moving
vite/tsconfig.json — mirrors the aliases for TypeScript
vite/index.html — security headers as <meta> (was nextjs/headers.js)
vite/src/main.tsx — React 19 root bootstrap
vite/src/env.ts — runtime envs: window.__envs first, import.meta.env
fallback, maps NEXT_PUBLIC_API_HOST → VITE_API_BASE_URL
vite/src/redirects.ts — full port of nextjs/redirects.js (69 client rules)
vite/src/App.tsx — wouter router with CatchAll redirect resolver
vite/Dockerfile — 2-stage → ghcr.io/hanzoai/spa
vite/LLM.md — what's done, what's left, how to finish
The production Dockerfile at ../Dockerfile still builds the Next.js app. This
scaffold is independent; nothing in the existing tree is deleted or moved.
See vite/LLM.md for the full migration plan and 9 critical TODOs before this
can replace the Next.js build.
32 lines
821 B
JSON
32 lines
821 B
JSON
{
|
|
"compilerOptions": {
|
|
"target": "ES2022",
|
|
"module": "ESNext",
|
|
"moduleResolution": "Bundler",
|
|
"jsx": "react-jsx",
|
|
"strict": true,
|
|
"skipLibCheck": true,
|
|
"esModuleInterop": true,
|
|
"allowSyntheticDefaultImports": true,
|
|
"resolveJsonModule": true,
|
|
"isolatedModules": true,
|
|
"noEmit": true,
|
|
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
"types": ["vite/client"],
|
|
"baseUrl": ".",
|
|
"paths": {
|
|
"configs/*": ["../configs/*"],
|
|
"lib/*": ["../lib/*"],
|
|
"mocks/*": ["../mocks/*"],
|
|
"nextjs/*": ["../nextjs/*"],
|
|
"stubs/*": ["../stubs/*"],
|
|
"toolkit/*": ["../toolkit/*"],
|
|
"tools/*": ["../tools/*"],
|
|
"types/*": ["../types/*"],
|
|
"ui/*": ["../ui/*"],
|
|
"icons/*": ["../icons/*"]
|
|
}
|
|
},
|
|
"include": ["src", "vite.config.ts"]
|
|
}
|