Askr documentation
Generated API snapshot

@askrjs/vite

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.

askrtype

askrVitePlugin: (options?: AskrVitePluginOptions) => AskrVitePlugin

Create the Askr Vite plugin, which transforms Askr JSX/TSX with oxc, wires up dependency pre-bundling and aliasing for `@askrjs/askr`, and optionally runs the responsive image pipeline and template optimizer. JSX transform failures are reported through the active Vite/Rollup plugin context with the source file and original transform detail.

askrVitePlugintype

askrVitePlugin: (options?: AskrVitePluginOptions) => AskrVitePlugin

Create the Askr Vite plugin, which transforms Askr JSX/TSX with oxc, wires up dependency pre-bundling and aliasing for `@askrjs/askr`, and optionally runs the responsive image pipeline and template optimizer. JSX transform failures are reported through the active Vite/Rollup plugin context with the source file and original transform detail.

AskrVitePlugintype

AskrVitePlugin: any

Portable public plugin identity. Vite-compatible runners only require the plugin name. Keeping versioned Vite hook types out of the installed declaration prevents consumers such as vite-plus from comparing two distinct copies of Vite's recursive Plugin type.

name
readonly name: "askr:vite";

AskrVitePluginOptionstype

AskrVitePluginOptions: any

Options accepted by {@link askrVitePlugin}.

transformJsx
Transform `.jsx`/`.tsx` files with the Askr JSX runtime. Defaults to `true`.
optimizeTemplates
Hoist repeated JSX class/style literals using parsed compiled output. Defaults to `false`.
ssrPrecompile
ssrPrecompile?: boolean;
images
Opt into declared responsive image transforms.

ImagePipelineOptionstype

ImagePipelineOptions: any

Plugin-level defaults applied to every `image()` declaration.

widths
widths?: readonly number[];
formats
formats?: readonly ImageOutputFormat[];
quality
quality?: ImageQualityOptions;