@davezuko/esbuild-plugin-preact
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

@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,
        }),
    ],
})

Readme

Keywords

none

Package Sidebar

Install

npm i @davezuko/esbuild-plugin-preact

Weekly Downloads

1

Version

0.2.0

License

MIT

Unpacked Size

5.11 kB

Total Files

4

Last publish

Collaborators

  • deltazulu