SSR / foldkit-ssr/loader

LoaderOptions

interface · packages/ssr/src/loader.ts:31

interface LoaderOptions {
  readonly runtime: () => Promise<unknown>
}

Members

LoaderOptions.runtime

property · packages/ssr/src/loader.ts:39

readonly runtime: () => Promise<unknown>

Runs the runtime's chunk: a dynamic import of the module that calls SSR.hydrate, such as () => import('./entry.js'). Called once. With runtimeChunk from foldkit-ssr/vite naming the same module, a build also fetches the chunk as the loader starts, without running it (<link rel="modulepreload">); without it, the chunk is fetched as it runs.