-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatically open browser #311
Comments
Can you test if #329 works as you would expect? |
should have option to define which browser to use |
and is it possible to open open something else?... let's say open |
Is new WebpackDevServer(webpack(config), {
publicPath: config.output.publicPath,
hot: true,
historyApiFallback: true,
inline: true,
stats: { colors: true },
headers: { 'Access-Control-Allow-Origin': '*' },
open: 'http://localhost:8081'
}).listen(8081, 'localhost', function (err, result) {
if (err) {
return console.log(err);
}
console.log('Listening at http://localhost:8081/');
}); |
@bennyn did you manage to do this ? |
In my webpack.config.js: Does it work for anyone? |
For me |
@SpaceK33z I'm trying to use the |
@emilio-martinez I face the same problem as you. Seems that The webpack-dev-server/bin/utils.js Lines 41 to 89 in d0725c9
webpack-dev-server/bin/webpack-dev-server.js Lines 30 to 36 in d0725c9
webpack-dev-server/bin/webpack-dev-server.js Line 404 in d0725c9
webpack-dev-server/bin/webpack-dev-server.js Line 419 in d0725c9
So, no way to open browser via Node API. |
`webpack-dev-server` doesn't use `open` option in Node API. They only use it in CLI. See webpack/webpack-dev-server#311 (comment) So, I do it myself.
Please add a flag to
webpack-dev-server
that will automatically open the browser to the configured url.The text was updated successfully, but these errors were encountered: