Skip to content

docs(devServer): clarify devServer "open" option description #1890

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

Merged
merged 7 commits into from
Dec 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion src/content/configuration/dev-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -638,13 +638,24 @@ module.exports = {
};
```

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:

```javascript
module.exports = {
//...
devServer: {
open: 'Google Chrome'
}
};
```

Usage via the CLI

```bash
webpack-dev-server --open
```

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

__webpack.config.js__

Expand Down
1 change: 0 additions & 1 deletion src/content/guides/production.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ __package.json__

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


## Specify the Mode

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:
Expand Down