Skip to content

TypstPluginOptions

Options for the Vite Typst transformation plugin.

optional backend?: "auto" | "worker" | "jspi"

Backend passed to the compiler.


optional configureCompiler?: (compiler) => void | Promise<void>

Configures the compiler after it has been created.

TypstCompiler

void | Promise<void>


optional coreModules?: Readonly<Record<CoreModuleName, Module | Promise<Module>>>

Precompiled core WASM modules. Defaults to the modules published by typst-wasm.


optional fetch?: {(input, init?): Promise<Response>; (input, init?): Promise<Response>; }

Fetch implementation used for URL and package resources.

(input, init?): Promise<Response>

MDN Reference

RequestInfo | URL

RequestInit

Promise<Response>

(input, init?): Promise<Response>

MDN Reference

string | Request | URL

RequestInit

Promise<Response>


optional fileLoaders?: TypstFileLoader[]

Additional file loaders.


optional logger?: TypstLogger

Receives compiler library messages.


optional logLevel?: TypstLogLevel

Controls compiler library messages.


optional memoryPackageCacheCapacity?: number

Capacity of the in-memory package cache.


optional packageBaseUrl?: string

Base URL used for Typst package downloads.


optional packageCache?: false | PackageCache

Cache used for downloaded packages, or false to disable caching.


optional worker?: () => WorkerHost

Worker factory passed to the compiler.

WorkerHost