From 1bb6dab80fb4f1271bda5df41897b3b7abdddd75 Mon Sep 17 00:00:00 2001 From: Zen Date: Thu, 8 Apr 2021 12:17:21 +0800 Subject: [PATCH] docs: update example code of Limitations --- 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])`**