Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@preact/preset-vite

Package Overview
Dependencies
Maintainers
10
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@preact/preset-vite

Preact preset for the vite bundler

  • 2.1.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
45K
decreased by-25.12%
Maintainers
10
Weekly downloads
 
Created
Source

@preact/preset-vite

An all in one preset for writing Preact apps with the vite bundler.

Features:

  • Sets up Hot Module Replacement via prefresh
  • Enables Preact Devtools bridge during development

Installation

First intall the preset package from npm:

npm install --save-dev @preact/preset-vite
# or
yarn add -D @preact/preset-vite

Enhance your vite config with the Preact preset plugin in your vite.config.ts or vite.config.js:

import { defineConfig } from "vite";
import preact from "@preact/preset-vite";

export default defineConfig({
  plugins: [preact()]
});

Options

Options can be passed to our preset plugin via the first argument:

export default defineConfig({
  plugins: [
    preact({ devtoolsInProd: true })
  ]
});

Available options

OptionTypeDefaultDescription
devtoolsInProdbooleanfalseInject devtools bridge in production bundle instead of only in development mode

License

MIT, see the license file.

Keywords

FAQs

Package last updated on 04 Oct 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc