Open Browser Webpack Plugin
Opens a new browser tab when Webpack loads. Very useful if you're lazy and don't want to force yourself to open a new tab when Webpack is ready to play!
npm install open-browser-webpack-plugin --save-dev
Simply require the plugin and add it in the plugins section:
var OpenBrowserPlugin = ;moduleexports =entry: pathoutput:path: __dirname + "/bundle/"filename: "bundle.js"plugins:url: '';
Url to open when Webpack is ready. Needs to have the prefix
https:// in order to open the browser.
By default the browser is opened immediately, but this could be too early in some cases (eg. starting a nodeJS server). The value is specified in milliseconds.
Browser to open. By default, it will try to open the browser set by default in your system.
By default this plugin only opens the browser if there's no Webpack errors. Setting ignoreErrors to true will open a new tab no matter the compilation errors.
1.0.0 - 2018-30-05
- Replace open with opn to fix vulnerability.
0.0.5 - 2017-03-09
- Fix issue where the compilation never ends. (Thanks to @vkalinichev)
0.0.4 - 2017-02-19
- Fix issue where other Webpack callbacks were removed. (Thanks to @plemarquand)
0.0.3 - 2016-10-31
- delay option (Thanks to @Root-Core)
0.0.2 - 2015-12-26
- ignoreErrors option (Thanks to @zhura).
- Documentation for options.
- DEFAULT_BROWSER constant.
0.0.1 - 2015-09-12
- First release.