lunx.docs
DocsGuidesServer Builds

Server, Edge and SSR Builds

Bundle a Node server, a Workers-style edge function, or both halves of a server-rendered app, on the same Rolldown engine as app builds.

New in 1.1.0
typescriptlunx.config.ts
export default defineConfig({ platform: 'node' });   // or 'edge'

export default defineConfig({
  preset: 'ssr',
  entry: ['src/entry-server.tsx'],
});
FieldTypeDefaultDescription
platform: 'node'target—Bundles the server entry as an ES module; dependencies stay in node_modules.
platform: 'edge'target—Bundles every dependency too, for runtimes with no node_modules; resolves workerd / worker / edge-light exports.
preset: 'ssr'target—Builds the page into dist/browser and the server entry into dist/node. Without an index.html, only the server half is built.

Server entry

Set entry, or lunx looks for src/server.ts, src/entry-server.tsx, src/index.ts and similar names.