feat: v2 React frontend is now primary at /

- v1 vanilla JS frontend moved to /classic (static/classic/)
- v2 React app now serves at / (root)
- Vite base changed from /v2/ to /
- Assets at /assets/, service worker at /sw.js
- /classic still works — all v1 files preserved with relative paths
- /v2 still works as before (build output unchanged)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Erik 2026-04-14 12:17:23 +02:00
parent 69678a9426
commit 9f7686681b
41 changed files with 9080 additions and 175 deletions

View file

@ -10,5 +10,5 @@ createRoot(document.getElementById('root')!).render(
// Register service worker for asset caching
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('/v2/sw.js').catch(() => {});
navigator.serviceWorker.register('/sw.js').catch(() => {});
}

View file

@ -3,9 +3,9 @@ import react from '@vitejs/plugin-react'
export default defineConfig({
plugins: [react()],
base: '/v2/',
base: '/',
build: {
outDir: '../static/v2',
outDir: '../static/v2', // still build to v2/ first, then we copy
emptyOutDir: true,
chunkSizeWarningLimit: 300,
rollupOptions: {