@davezuko/esbuild-plugin-preact
v0.2.0
Published
esbuild plugin to replace react and react-dom with preact/compat
Downloads
22
Readme
@davezuko/esbuild-plugin-preact
JavaScript plugin for esbuild that replaces "react" and "react-dom" with "preact/compat".
import * as esbuild from "esbuild"
import {esbuildPluginPreact} from "@davezuko/esbuild-plugin-react"
esbuild.build({
plugins: [
esbuildPluginPreact({
/** replace "react" imports with "preact"? (default: true) */
replaceReact: true,
/** preserve "preact/debug"? (default: true) */
keepDevtools: true,
}),
],
})