Hot Reload Chrome Extension - Vite Plugin
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 repo.
![demo](https://raw.githubusercontent.com/isaurssaurav/hot-reload-extension-vite/main/demo/demo.png)
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'
})
]
};
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. |
backgroundPath | string(required) | Path to background service worker file. |
License
MIT