Skip to content

@arcmantle/lit-jsx / compiler/vite-plugin

compiler/vite-plugin

Interfaces

LitJsxPluginOptions

Defined in: compiler/vite-plugin.ts:11

Properties

babel?

optional babel: TransformOptions | (code, id) => TransformOptions | Promise<TransformOptions>

Defined in: compiler/vite-plugin.ts:38

Options for the Babel transform

debug?

optional debug: boolean

Defined in: compiler/vite-plugin.ts:36

Enable debug mode for additional logging

Default
ts
false
legacyDecorators?

optional legacyDecorators: boolean

Defined in: compiler/vite-plugin.ts:16

Enable legacy decorators support

Default
ts
false
useCompiledTemplates?

optional useCompiledTemplates: boolean

Defined in: compiler/vite-plugin.ts:21

Enables support for experimental compiled templates

Default
ts
true
useImportDiscovery?

optional useImportDiscovery: boolean

Defined in: compiler/vite-plugin.ts:26

Opts into the automatic discovery is custom elements instead of using the static attribute

Default
ts
false
useTypeInference?

optional useTypeInference: boolean

Defined in: compiler/vite-plugin.ts:31

Enable TypeScript type inference for automatic static/dynamic element detection

Default
ts
false

Functions

litJsx()

litJsx(options): PluginOption

Defined in: compiler/vite-plugin.ts:50

Vite plugin for jsx-lit with preserve-JSX compilation.

This plugin uses Babel to transform JSX directly into Lit templates at build time, providing optimal performance by eliminating runtime JSX processing entirely.

Parameters

options

LitJsxPluginOptions = {}

Returns

PluginOption

Released under the Apache-2.0 License.