From 9c2fe1f23a9f0a85799edaacd878da25dbde63e8 Mon Sep 17 00:00:00 2001 From: EugeneHlushko Date: Tue, 6 Mar 2018 15:37:56 +0200 Subject: [PATCH] docs(mode) provide available options table --- src/content/concepts/mode.md | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/content/concepts/mode.md b/src/content/concepts/mode.md index 9f24a035314c..b812828a29e3 100644 --- a/src/content/concepts/mode.md +++ b/src/content/concepts/mode.md @@ -7,8 +7,7 @@ contributors: Providing the `mode` configuration option tells webpack to use its built-in optimizations accordingly. -`string` (development | production) - +`string` ## Usage @@ -19,6 +18,7 @@ module.exports = { mode: 'production' }; ``` + or pass it as a cli argument: @@ -26,8 +26,15 @@ or pass it as a cli argument: webpack --mode=production ``` +The following string values are supported: + +Option | Description +--------------------- | ----------------------- +`development` | Provides `process.env.NODE_ENV` with value `development`. Enables `NamedModulesPlugin`. +`production` | Provides `process.env.NODE_ENV` with value `production`. Enables `UglifyJsPlugin`, `ModuleConcatenationPlugin` and `NoEmitOnErrorsPlugin`. -## Mode: development + +### Mode: development ```diff @@ -41,7 +48,8 @@ module.exports = { } ``` -## Mode: production + +### Mode: production ```diff