diff --git a/src/content/configuration/dev-server.md b/src/content/configuration/dev-server.md index 30c8d00f1b70..6af19d0cb28b 100644 --- a/src/content/configuration/dev-server.md +++ b/src/content/configuration/dev-server.md @@ -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__ diff --git a/src/content/guides/production.md b/src/content/guides/production.md index 6fc2edf8d741..493fc7c06333 100644 --- a/src/content/guides/production.md +++ b/src/content/guides/production.md @@ -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: