I have googled about it, could not find anything related to the question.
The reason I want this is for workflow issues. I have setup a developer account on chrome canary and would like to keep all things related to development to that browser.
In devServer options object, is there a place where I can tell webpack-dev-server to open "Google Chrome Canary". I use Mac, if that makes a difference.
Looks like they added a possibility to set a browser name in open
option in v2.8.0.
Note that at least for some browsers browser name will be OS-specific (it seems to be passed directly to opn
package, therefore, same rules):
https://github.com/webpack/webpack-dev-server/pull/825
In addition to googling, you may want to search in package's repository Issues as well. Takes some time and "popularity" before google shows it on top of other matches.
This is how I fixed the issue. In package.json:
"start": "webpack-dev-server --config webpack.dev.js --open chrome",
of course, you can use webpack.config.js instead webpack.dev.js
In webpack.config.js:
devServer: {
...
open: 'chrome'
},
This is for Google Chrome, so just use any other browser name.
For MacOS:
"start": "webpack-dev-server --open 'google chrome'"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With