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

@preact/preset-vite

Package Overview
Dependencies
Maintainers
9
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

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
45K
decreased by-25.12%
Maintainers
9
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:

// vite.config.js or vite.config.ts
import withPreact from "@preact/preset-vite";

export default withPreact({
  // Your usual vite config
});

Options

Options can be passed to our preset by adding a second argument:

export default withPreact(viteConfig, {
  // Add your options here
  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 13 Mar 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