Vite plugin that configures JSX for Mithril.js — works with all Vite versions (5, 6, 7+), automatically adapting to the underlying transformer (esbuild or rolldown/OXC). Ships TypeScript types. Peer dependency: vite >=5.0.0. Current stable version: 1.0.4. Release cadence: low, maintenance-driven. Key differentiator: zero-config JSX setup for Mithril across Vite versions, handles esbuild, rolldown, and OXC configs automatically.
npm install vite-plugin-mithril-jsxNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows minimal Vite config with plugin, then a JSX component using Mithril.
Add `import m from 'mithril'` at the top of each JSX file, or set `globalThis.m = m` in your entry file before any JSX usage.
Only enable `jsExtensions` if you have JSX in .js/.ts files; keep default false otherwise.
No action needed; plugin auto-adapts.
Avoid naming any variable or import `mFrag`; rely on the plugin's define.
Add `import m from 'mithril'` to the file using JSX.
Run `npm install mithril` and ensure it's in your package.json.
Use `import mithrilJsx from 'vite-plugin-mithril-jsx'` in an ESM context.
Use `import mithrilJsx from 'vite-plugin-mithril-jsx'` (no curly braces).