TypstPluginOptions
Options for the Vite Typst transformation plugin.
Properties
Section titled “Properties”backend?
Section titled “backend?”
optionalbackend?:"auto"|"worker"|"jspi"
Backend passed to the compiler.
configureCompiler?
Section titled “configureCompiler?”
optionalconfigureCompiler?: (compiler) =>void|Promise<void>
Configures the compiler after it has been created.
Parameters
Section titled “Parameters”compiler
Section titled “compiler”TypstCompiler
Returns
Section titled “Returns”void | Promise<void>
coreModules?
Section titled “coreModules?”
optionalcoreModules?:Readonly<Record<CoreModuleName,Module|Promise<Module>>>
Precompiled core WASM modules. Defaults to the modules published by typst-wasm.
fetch?
Section titled “fetch?”
optionalfetch?: {(input,init?):Promise<Response>; (input,init?):Promise<Response>; }
Fetch implementation used for URL and package resources.
Call Signature
Section titled “Call Signature”(
input,init?):Promise<Response>
Parameters
Section titled “Parameters”RequestInfo | URL
RequestInit
Returns
Section titled “Returns”Promise<Response>
Call Signature
Section titled “Call Signature”(
input,init?):Promise<Response>
Parameters
Section titled “Parameters”string | Request | URL
RequestInit
Returns
Section titled “Returns”Promise<Response>
fileLoaders?
Section titled “fileLoaders?”
optionalfileLoaders?:TypstFileLoader[]
Additional file loaders.
logger?
Section titled “logger?”
optionallogger?:TypstLogger
Receives compiler library messages.
logLevel?
Section titled “logLevel?”
optionallogLevel?:TypstLogLevel
Controls compiler library messages.
memoryPackageCacheCapacity?
Section titled “memoryPackageCacheCapacity?”
optionalmemoryPackageCacheCapacity?:number
Capacity of the in-memory package cache.
packageBaseUrl?
Section titled “packageBaseUrl?”
optionalpackageBaseUrl?:string
Base URL used for Typst package downloads.
packageCache?
Section titled “packageCache?”
optionalpackageCache?:false|PackageCache
Cache used for downloaded packages, or false to disable caching.
worker?
Section titled “worker?”
optionalworker?: () =>WorkerHost
Worker factory passed to the compiler.
Returns
Section titled “Returns”WorkerHost