Parent
#114 — v0.41.0-alpha.5: SPA Mode + Deno Desktop Proof
What to build
At build time, the Vite plugin (@openelement/adapter-vite) scans the routes/ directory and generates a client router manifest that maps route paths to lazy-loaded component imports. This enables route-level code splitting in SPA mode — only the current route's code is loaded on first page, and navigation triggers lazy-loading of the target route.
Build-time manifest generation:
- Plugin scans
routes/**/*.tsx during vite build
- Generates a manifest like
{ '/': () => import('./routes/index.tsx'), '/products': () => import('./routes/products.tsx') }
- Injects the manifest into the client bundle
Runtime behavior:
- Router uses the manifest to resolve route → component mapping
- First navigation to a route triggers
import() (code split point)
- Subsequent navigations to the same route reuse the cached module
- Loading state between navigation (lazy-loading a route for the first time shows a loading indicator or renders nothing until resolved)
Manual escape hatch:
defineRoute({ path: '/admin', lazy: () => import('./routes/admin.tsx') }) supported but unnecessary for file-system routes
Acceptance criteria
Blocked by
None — can start immediately (parallel with #115)
Parent
#114 — v0.41.0-alpha.5: SPA Mode + Deno Desktop Proof
What to build
At build time, the Vite plugin (
@openelement/adapter-vite) scans theroutes/directory and generates a client router manifest that maps route paths to lazy-loaded component imports. This enables route-level code splitting in SPA mode — only the current route's code is loaded on first page, and navigation triggers lazy-loading of the target route.Build-time manifest generation:
routes/**/*.tsxduringvite build{ '/': () => import('./routes/index.tsx'), '/products': () => import('./routes/products.tsx') }Runtime behavior:
import()(code split point)Manual escape hatch:
defineRoute({ path: '/admin', lazy: () => import('./routes/admin.tsx') })supported but unnecessary for file-system routesAcceptance criteria
deno task buildgenerates a route manifest fromroutes/*.tsxfilesimport()for the target routedefineRoute({ lazy: () => import(...) })manual override worksBlocked by
None — can start immediately (parallel with #115)