@fluixi/vite-plugin
v1.0.0-alpha.57
Published
Vite plugin for Fluixi — compiles JSX via @fluixi/compiler (jsx or imperative backend).
Readme
@fluixi/vite-plugin
The Vite plugin for Fluixi — JSX transform + codegen backend selection.
✨ Overview
@fluixi/vite-plugin sets the esbuild jsxImportSource and runs the Fluixi JSX transform
(via @fluixi/compiler), with a choice of codegen backend. @fluixi/core
re-exports fluixi/createVitePlugin from here, and @fluixi/start wires it
in automatically — use this plugin directly for a plain (non-meta-framework) Vite app.
📦 Installation
pnpm add -D @fluixi/vite-plugin🚀 Usage
import { defineConfig } from 'vite';
import { fluixi } from '@fluixi/vite-plugin';
export default defineConfig({
plugins: [
fluixi({
// 'imperative' (default) compiles straight into @fluixi/dom runtime calls
// (createNativeElement/spread/insert/…); 'jsx' emits jsx()/jsxs().
backend: 'imperative',
}),
],
});⚙️ Options
Options are @fluixi/compiler's CompilerOptions:
| Option | Default | What |
| --- | --- | --- |
| importSource | @fluixi/jsx | JSX runtime import source |
| backend | imperative | imperative or jsx codegen |
| signalModule / controlFlowModule | @fluixi/dom | where imperative runtime symbols come from |
| delegateEvents | true | event delegation |
| sourceMaps | true | emit source maps |
