Deploying to Netlify
The build emits a v2 function through Netlify's Frameworks API with the routing policy made declarative: the CDN serves files first, the catch-all function renders everything else, and your netlify.toml stays yours.
The generated layout
.netlify/v1/functions/sigx-ssr/
├── sigx-ssr.mjs # the v2 function: bare default fetch fn + in-source config
├── <bundled entry>.js # your entry, fully self-contained (+ any chunks)
└── package.json # {"type":"module"}
The Frameworks API is Netlify's recommended channel for build-tool adapters. The generated in-source config is the routing policy made declarative:
path: '/*'— the catch-all,preferStatic: true— CDN files win before the function runs,nodeBundler: 'none'— the output is final; Netlify ships the directory as-is.
Two details are load-bearing:
index.htmlis removed from the publish dir after the build — it is the raw outlet template, andpreferStaticwould serve it for/, shadowing the document render. (The template is already inlined into the bundle viavirtual:sigx-app.)netlify.tomlis printed, never written — the config is yours from its first character.
The platform entry — yours, scaffolded once
The first build scaffolds src/entry.netlify.ts iff absent and never touches
it again. It keeps the same export default { fetch } shape as every sigx
platform entry — the Netlify-specific contract (bare default function +
export const config) lives in the generated wrapper, so your composition
stays portable:
static assets → server functions → document render
Deploy
vite build --app -c vite.config.netlify.ts
netlify deploy --prod # builds by default
netlify deploy --prod --no-build # ship the prebuilt output as-is
Verification posture
Structural, not emulation: CI asserts the generated layout and invokes the
function's default export directly under Node with real Requests (a pure
fetch handler — the context argument is optional sugar it never touches).
Reference wiring: examples/resume in the
SignalX core repo
(vite.config.netlify.ts, committed entry.netlify.ts, netlify.toml).
