0.0.1 • Published 11 months ago
vite-plugin-preact-swc v0.0.1
vite-plugin-preact-swc
Experimental
Develop your Preact apps with Vite and SWC.
A port of @vitejs/plugin-react-swc for Preact, the options and caveats are basically the same.
Additional caveats
SWC is extremely strict with versions. For reference, @swc/plugin-prefresh 2.0.8 and 2.0.9 works with @swc/core 1.7.x and @swc/plugin-prefresh 2.0.7 works with @swc/core 1.6.x. Please override versions as needed.
See https://swc.rs/docs/plugin/selecting-swc-core for more.
Features
- Transform Preact components with SWC at dev time (or at build time if swc plugins are used)
- Fast-refresh with @swc/plugin-prefresh
Installation
npm i -D vite-plugin-preact-swc
Usage
import { defineConfig } from "vite";
import preact from "vite-plugin-preact-swc";
export default defineConfig({
plugins: [preact()],
});
Credits
0.0.1
11 months ago