Skip to content

Commit 0341516

Browse files
Simekmontogeek
authored andcommitted
docs(devServer): Clarify devServer "open" option description (#1890)
* docs(devServer): clarify devServer "open" option description Added information that you can also use browser name in the config file. * docs(devServer): add missing type to 'open' option * docs(devServer): fix Travis CI * docs(guides): fix sentence (#1887) This removes a word that made a sentence not grammatically correct. * docs (guides): Missing line in diff and missing semicolons (#1907) * Update dev-server.md
1 parent 51232cc commit 0341516

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

src/content/configuration/dev-server.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,13 +638,24 @@ module.exports = {
638638
};
639639
```
640640

641+
If no browser is provided (as shown above), your default browser will be used. To specify a different browser, just pass its name instead of boolean:
642+
643+
```javascript
644+
module.exports = {
645+
//...
646+
devServer: {
647+
open: 'Google Chrome'
648+
}
649+
};
650+
```
651+
641652
Usage via the CLI
642653

643654
```bash
644655
webpack-dev-server --open
645656
```
646657

647-
If no browser is provided (as shown above), your default browser will be used. To specify a different browser, just pass its name:
658+
Or with specified browser:
648659

649660
__webpack.config.js__
650661

src/content/guides/production.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@ __package.json__
147147

148148
Feel free to run those scripts and see how the output changes as we continue adding to our _production_ configuration.
149149

150-
151150
## Specify the Mode
152151

153152
Many libraries will key off the `process.env.NODE_ENV` variable to determine what should be included in the library. For example, when not in _production_ some libraries may add additional logging and testing to make debugging easier. However, with `process.env.NODE_ENV === 'production'` they might drop or add significant portions of code to optimize how things run for your actual users. Since webpack v4, specifying [`mode`](/concepts/mode/) automatically configures [`DefinePlugin`](/plugins/define-plugin) for you:

0 commit comments

Comments
 (0)