vite-plugin-mitosis
v0.1.0
Published
Vite plugin to import JSX components to different UI frameworks
Downloads
59
Maintainers
Readme
vite-plugin-mitosis
Vite plugin to import JSX components to different UI frameworks using mitosis.
Usage
SvelteKit
// vite.config.js
import { defineConfig } from 'vite';
import { svelteKit } from '@sveltejs/kit/vite';
import mitosis from 'vite-plugin-mitosis';
export default defineConfig({
// ...
plugins: [mitosis(), sveltekit()],
// ^ should go before sveltekit
});
// svelte.config.js
const config = {
extensions: ['.svelte', '.jsx', '.tsx'],
};
Then JSX components can be imported as is:
import Button from '$lib/components/Button.jsx';