Hot Reload Chrome Extension - Vite Plugin
This vite plugin provides simple solution to reload the chrome extension which runs on manifest v3.
Inspired from stackoverflow answer and other repo.
![demo](https://raw.githubusercontent.com/isaurssaurav/hot-reload-extension-vite/main/demo/index.png)
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',
backgroundPath: 'path/to/background'
})
]
};
Then run
$ NODE_ENV=development vite build --watch
Extension will only reload when NODE_ENV is 'development'
Running example
In progress
Options
Options | Type | Description |
---|
log | boolean (optional) | Logs error and info. |
contentPath | string (required) | Path to content script file. |
backgroundPath | string(required) | Path to background service worker file. |
License
MIT