From afe55817106a61af03c9a25d03e06fab2de7c231 Mon Sep 17 00:00:00 2001 From: Zen Date: Mon, 7 Jun 2021 16:00:07 +0800 Subject: [PATCH] docs: update example code of Limitations (#180) --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a940a51..e0d8494 100644 --- a/README.md +++ b/README.md @@ -44,8 +44,8 @@ const productionConfig = { ... }; const developmentConfig = { ... }; -module.exports = env => { - switch(env) { +module.exports = (env, args) => { + switch(args.mode) { case 'development': return merge(commonConfig, developmentConfig); case 'production': @@ -56,7 +56,7 @@ module.exports = env => { } ``` -You can choose the configuration you want by using `webpack --env development` assuming you are using _webpack-cli_. +You can choose the configuration you want by using `webpack --mode development` assuming you are using _webpack-cli_. ## **`mergeWithCustomize({ customizeArray, customizeObject })(...configuration | [...configuration])`**