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

hot-reload-extension-vite

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hot-reload-extension-vite

Simple vite plugin to reload the chrome extension.

  • 1.0.12
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
428
increased by23.7%
Maintainers
1
Weekly downloads
 
Created
Source

Node.js CI

Hot Reload Chrome Extension - Vite Plugin

image

This Vite plugin offers an effortless solution for seamlessly refreshing a Chrome extension built on Manifest V3. With this plugin, you can streamline the development and testing process, ensuring your extension stays up-to-date without manual intervention.

Inspired by stackoverflow answer and other similar repos.

Usage

Install

$ npm i hot-reload-extension-vite -D

configuration

import hotReloadExtension from 'hot-reload-extension-vite';

export default {
  plugins: [
    hotReloadExtension({
      log: true,
      backgroundPath: 'path/to/background' // src/pages/background/index.ts
    })
  ]
};

Then run

$ NODE_ENV=development vite build --watch  // Override NODE_ENV

Extension will only reload when NODE_ENV is 'development'

Example Project

Link

Options

OptionsTypeDescription
logboolean (optional)Logs error and info.
backgroundPathstring (required)Path to background service worker file.

Env variables

VariabledefaultDescription
HOT_RELOAD_EXTENSION_VITE_PORT8080Web socket port

License

MIT

Keywords

FAQs

Package last updated on 28 Oct 2023

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