@preact/preset-vite
An all in one preset for writing Preact apps with the vite bundler.
Features:
Installation
First intall the preset package from npm:
npm install --save-dev @preact/preset-vite
yarn add -D @preact/preset-vite
Enhance your vite config with the Preact preset:
import withPreact from "@preact/preset-vite";
export default withPreact({
});
Options
Options can be passed to our preset by adding a second argument:
export default withPreact(viteConfig, {
devtoolsInProd: true
});
Available options
Option | Type | Default | Description |
---|
devtoolsInProd | boolean | false | Inject devtools bridge in production bundle instead of only in development mode |
License
MIT, see the license file.