Skip to content

Latest commit

 

History

History
40 lines (28 loc) · 1.07 KB

README.md

File metadata and controls

40 lines (28 loc) · 1.07 KB

Webpack-web-ext-plugin

This plugin is intended to serve as a plugin for webpack-based web extension developing.

Desktop: watch, auto-reload

Android: choose device, watch, reload

TODO

  • Support web-ext build

Usage

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 and noInput are enforced to true to work with webpack.