This project is no longer maintained, please follow vite-plugin-crx-mv3.
This is a vite plugin that helps Chrome extensions to refresh automatically when files are modified in development.
pnpm install vite-plugin-crx-hot-reload -Dimport crxHotReload from 'vite-plugin-crx-hot-reload'
export default {
plugins: [crxHotReload(/* plugin options */)]
}- Type:
number - Default:
8181
Establish a Socket Connection. Send a message to the Chrome extension client to update when a file changes.
- Type:
string - Required :
true
Manifest file for Chrome extension.
Example:
crxHotReload({
input: './src/manifest.json'
})- When in a development environment,
build.emptyOutDirneeds to be set tofalsein the vite configuration file. - After starting the project, if the page does not refresh automatically after modifying content_scripts, you may need to refresh the page manually first.