This plugin is intended to serve as a plugin for webpack-based web extension developing.
Desktop: watch, auto-reload
Android: choose device, watch, reload
- Support web-ext build
npm config set "@dimensiondev:registry" "https://npm.dimension.im"
npm install @dimensiondev/webpack-web-ext-plugin
Just add this to your webpack.config.js...
const WebExtPlugin = require("@dimensiondev/webpack-web-ext-plugin");
config.plugins.push(
// for Firefox
new WebExtPlugin({ sourceDir: dist }),
// for Firefox on Android
new WebExtPlugin({ sourceDir: dist, target: "firefox-android" })
);
This plugin takes all CmdRunParams and CmdRunOptions from
web-ext run
.You can customize it as much as your can.
...except
noReload
andnoInput
are enforced totrue
to work with webpack.