Askr documentation
Generated API snapshot

@askrjs/vite/server

Exports from the declarations published in @askrjs/vite. Signatures reflect the published artifact.

Exports

This entrypoint publishes 5 exports. Use the anchored symbol rows for direct links. Type-only exports are labeled separately from runtime values.

AskrDocumentOptionstype

AskrDocumentOptions: any

Options for composing a rendered Askr fragment into the HTML document.

telemetry
telemetry?: ViteTelemetry;

askrServer

askrServer: (options: AskrServerOptions) => AskrServerPlugin

Create the Vite plugin that serves Askr's server-rendered document during development and generates the {@link ASKR_SERVER_MODULE_ID } virtual module that composes the built server app with the HTML document.

AskrServerOptionstype

AskrServerOptions: any

Options for {@link askrServer}.

entry
Path to the server entry module, resolved relative to the Vite root.
exportName
Named export on `entry` providing the `ServerApp`. Defaults to `"app"`, falling back to the default export.
indexHtml
Path to the HTML document template, resolved relative to the Vite root. Defaults to `"index.html"`.

AskrServerPlugintype

AskrServerPlugin: any

Portable public identity for the server integration plugin.

name
readonly name: "askr:server";

createDocumentApp

createDocumentApp: (app: ServerApp, transformedDocument: string, options?: AskrDocumentOptions) => ServerApp

Wrap app so every response is composed into transformedDocument via {@link composeAskrDocumentResponse }.