-
-
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
Open default browser if --open option is given #329
Conversation
Not sure if this is environmental for me, but I get this error:
|
@claycephas @SpaceK33z it opens the wrong uri when |
@sokra, how did you test this? I'm using Even when I add this it seems to work fine: devServer: {
inline: false
} |
It should open the printed url.
|
Okay, I intentionally did it without the Thank you for merging all my PR's so far and the constructive feedback @sokra :). |
ok, I updated my package.json file to have this entry:
then ran
now this works as expected
Please merge! |
Open default browser if --open option is given
Thanks... Could you also update documentation page to include this CLI option? |
@sokra, I have edited the wiki to include the |
Is it possible to use this option when opening webpackDevServer from a node script?
|
@sandwichsudo, nope, not at the moment. |
This doesn't open browser for me.. am I missing something? "scripts": {
"start": "babel-node server/index.js | webpack-dev-server --open"
},
"devDependencies": {
"webpack-dev-server": "^1.14.1"
} And webpack.config: entry: [
'webpack-dev-server/client?http://localhost:8080',
'webpack/hot/only-dev-server',
'./client/index.js'
],
devServer: {
contentBase: './dist',
hot: true,
noInfo: true
} |
@Gopikrishna19, apparently it was not part of the 1.14.1 release. In the next 2.0 version it should work. |
webpack is awesome! just reached here. half a year later. is it possible to have a patch for this as 2.x is not out yet? I will gladly help if you guide me. |
@GuyMograbi, I happen to be working on a v1 release. |
It's better I could decide which url to open with the |
Before webpack 2.0 released, I think using |
Is it possible to specify this in |
I'd love to see this in the config.
|
@alflennik Maybe open a new issue with that as a feature request? |
@SpaceK33z, how to pass open option when webpack-dev-server is used as module? (https://github.com/webpack/docs/wiki/webpack-dev-server#api) |
Is there a way to specify a different url path or the standard url |
@pavel06081991 No way. It's only CLI feature. |
This will open your default browser with the app url if you add the
--open
option to the CLI.Fixes #311