Skip to content

feat(framework): production SSR build (#88)#96

Merged
qantrepreneur merged 4 commits into
mainfrom
88-production-ssr-build
May 15, 2026
Merged

feat(framework): production SSR build (#88)#96
qantrepreneur merged 4 commits into
mainfrom
88-production-ssr-build

Conversation

@qantrepreneur
Copy link
Copy Markdown
Contributor

@qantrepreneur qantrepreneur commented May 15, 2026

Summary

  • Add src/server.ts entry point to playground that wires createRequestHandler with route manifest
  • Update playground build script to vite build --ssr src/server.ts
  • Make matchRoute and createRequestHandler generic over route types via new MatchableRoute base type
  • Add ManifestRouteEntry type for typed manifest route entries with load() function
  • Strip .tsx/.ts extensions from generated route manifest imports for TypeScript compatibility
  • Runtime type guards (isPageModule, isHandlerModule, isTemplateId) instead of casts in server entry
  • Use pickRouteModule to extract page/handler from ESM module (fixes latent runtime bug where raw module was passed instead of the export)
  • Use async/await in loadTemplate instead of .then()
  • Use tabs in codegen output to match Prettier config
  • Allow export default in server.ts via ESLint override

Test plan

  • vite build --ssr src/server.ts produces working bundle in dist/
  • Built bundle exports a request handler function
  • Route transforms correctly inject paths in build output
  • All framework tests pass (258 tests)
  • Codegen tests updated for tab indentation and extensionless imports
  • Type check passes across monorepo
  • Lint and Prettier checks pass

Closes #88

🤖 Generated with Claude Code

Lorenzo and others added 3 commits May 15, 2026 11:57
Add server entry point, ManifestRouteEntry type, and strip .tsx extensions
from generated route manifest imports for TypeScript compatibility.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ort in server entry

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix Prettier formatting for generated framework.gen.d.ts and
resolve RequestHandlerOptions generic type parameter for RouteEntry.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@qantrepreneur qantrepreneur force-pushed the 88-production-ssr-build branch from 44ebca1 to 0917309 Compare May 15, 2026 09:59
The codegen for framework.gen.d.ts used 2-space indentation but
Prettier expects tabs. Also fixes RequestHandlerOptions generic
type parameter after rebase.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@qantrepreneur qantrepreneur merged commit a56dd64 into main May 15, 2026
2 checks passed
@github-actions github-actions Bot mentioned this pull request May 15, 2026
qantrepreneur added a commit that referenced this pull request May 21, 2026
* feat(framework): production SSR build via vite build --ssr (#88)

Add server entry point, ManifestRouteEntry type, and strip .tsx extensions
from generated route manifest imports for TypeScript compatibility.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: extract route module exports, use async/await, allow default export in server entry

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: resolve rebase conflicts and type errors

Fix Prettier formatting for generated framework.gen.d.ts and
resolve RequestHandlerOptions generic type parameter for RouteEntry.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: use tabs in codegen output to match Prettier config

The codegen for framework.gen.d.ts used 2-space indentation but
Prettier expects tabs. Also fixes RequestHandlerOptions generic
type parameter after rebase.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Lorenzo <lorenzofkramer@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This was referenced May 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(framework): production SSR build

1 participant