Standalone build and runtime
Production registry generation and Node runtime exports outside Nitro.
Build options
@lupinum/nuxt-pdf/build exports the buildPdfRegistry function and the
BuildPdfRegistryOptions type. The function resolves to Promise<void>.
| Option | Type | Behavior |
|---|---|---|
rootDir | string | Required application root containing pdfs/. Relative to the working directory. |
outDir | string | Required dedicated output directory inside rootDir and outside pdfs/. Relative paths use rootDir. An existing directory must carry Nuxt PDF's ownership marker. |
fonts | readonly PdfFontDeclaration[] | Defaults to no custom fonts. Sources resolve under pdfs/fonts/. |
limits | PdfLimitsOptions | Existing render and image-admission limits. Omitted fields use the engine defaults. |
remote | RemoteAssetOptions | Existing remote-image policy. Denied by default. |
The build rejects unknown options, missing templates, invalid resources, invalid
templates, and type errors. A successful build emits index.mjs, index.d.mts,
and the declarations needed for inferred props. It uses Vue's type checker at
build time; consumers use ordinary TypeScript. See
standalone rendering for the procedure and
output-directory replacement rules.
Server exports
@lupinum/nuxt-pdf/server is a Node-only production entry. It has no Nuxt virtual
imports or source compiler. Generated registries use createPdfTemplate to bind
a compiled component to its admitted resources, then createPdfRegistry to
assemble named template handles. Application code should use the generated
registry instead of constructing this resource configuration manually.
PdfRegistryEntries describes the readonly named handles. PdfRegistry
describes their runtime dispatch. PdfComponentProps extracts authored Vue
props. PdfDefinition describes compile-time metadata. PdfTemplate and
PdfRenderResult describe the public handle and completed bytes. The entry
also exports usePdfPageNumbers, NuxtPdfError, PDF_ERROR_CODES, and
PdfErrorCode with their existing behavior.
No export sends email, stores a document, authenticates a caller, or selects a backend provider. The runtime preserves the current Node requirements and resource limits.