1.0.13 • Published 7 months ago

hot-reload-extension-vite v1.0.13

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

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

1.0.11

7 months ago

1.0.13

7 months ago

1.0.12

7 months ago

1.0.10

7 months ago

1.0.9

7 months ago

1.0.8

7 months ago

1.0.7

8 months ago

1.0.6

8 months ago

1.0.5

8 months ago

1.0.4

8 months ago

1.0.3

8 months ago

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago