1.0.8 • Published 1 year ago

rollup-plugin-chrome-extensions-hmr v1.0.8

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

用于 rollup 或者 vite 来开发浏览器插件的热更新插件,只要你现在写的浏览器插件项目中有 background 模块,用它就完事了(用不了的话辛苦发下 issue ,我看到会处理的)。

rollup/vite based on the development of browser hmr plugin

Install

Use npm/yarn to install the plugin:

# npm
npm install -D rollup-plugin-chrome-extensions-hmr

# yarn
yarn add rollup-plugin-chrome-extensions-hmr

Usage

To to the plugin, add the following code in rollup/vite config:

import chromeExtensionsHmr from 'rollup-plugin-chrome-extensions-hmr';
import { resolve } from "path";

export default {
  // ....
  plugins: [
    chromeExtensionsHmr{
      backgroundPath: path.resolve(pagesDir, "background", "index.ts"),
      needWatchMode: true
    }
  ]
}

Options

ParamsTypeDefault ValueDescription
backgroundPathstring-the physical address of background module
needWatchModebooleantrueis used in watch mode
1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago