Skip to content

Latest commit

 

History

History
29 lines (17 loc) · 946 Bytes

README.md

File metadata and controls

29 lines (17 loc) · 946 Bytes

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

Usage

npm i or yarn add github:sunrisefox/webpack-web-ext-plugin

Just add this to your webpack.config.js...

const WebExtPlugin = require('webpack-web-ext-plugin')

// for firefox
config.plugins.push(new WebExtPlugin({ sourceDir: dist }))

// for firefox-android
config.plugins.push(new WebExtPlugin({ sourceDir: dist, target: 'firefox-android' }))

This plugin takes all CmdRunParams and CmdRunOptions from web-ext run (somewhere like https://github.com/mozilla/web-ext/blob/master/src/cmd/run.js#L25). You can customize it as much as your can. ...except noReload and noInput are enforced to true to work with webpack.

// TODO:

support web-ext build