baldore / open-browser-webpack-plugin

Opens a new browser tab when Webpack loads.
119 stars 27 forks source link

Browser not openning at all. #22

Open Pavel-Durov opened 6 years ago

Pavel-Durov commented 6 years ago

I followed the README instructions and I didn't get the browser openning. webpack.config.js:

var OpenBrowserPlugin = require('open-browser-webpack-plugin');
module.exports = function (env) {
    return {
        entry: "./index.js",
        output: { path: __dirname, filename: 'bundle.js' },
        resolve: { modules: ['node_modules'] },
        plugins: [new OpenBrowserPlugin({ url: 'http://localhost:3000' })]
    };
};

Ran it on Windows 7 and 16.04.1-Ubuntu with the following frameworks: webpack -v: 3.10.0 npm -v: 5.5.1 node -v: 8.9.1 open-browser-webpack-plugin version: 0.0.5

I ended up using node opn package manually: https://www.npmjs.com/package/opn