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.1
  • Source
  • npm
  • Socket score

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

Hot Reload Chrome Extension - Vite Plugin

Inspired from stackoverflow answer and other repo. This vite plugin provides simple solution to reload the chrome extension which runs on manifest v3. ALT TEXT

Usage

Install

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

configuration

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

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

Then run

$ NODE_ENV=development vite build --watch

Extension will only reload when NODE_ENV is 'development'

Running example

In progress

Options

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

License

MIT

Keywords

FAQs

Package last updated on 24 Sep 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