From 3bf55b7a0468afc4b4fd28ed479a63fd747caaa0 Mon Sep 17 00:00:00 2001 From: rigor789 Date: Mon, 9 Aug 2021 15:56:32 +0200 Subject: [PATCH] feat: handle config name related to https://github.com/NativeScript/nativescript-cli/pull/5554 --- packages/webpack5/src/bin/index.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/webpack5/src/bin/index.ts b/packages/webpack5/src/bin/index.ts index 7b63ef183..a8db8dacf 100644 --- a/packages/webpack5/src/bin/index.ts +++ b/packages/webpack5/src/bin/index.ts @@ -56,7 +56,12 @@ program env['env'] = options.env; } - env['watch'] = options.watch; + env['watch'] ??= options.watch; + + // if --env.config is passed, we'll set an environment + // variable to it's value so that the config Util + // reads from the correct config file. + process.env.NATIVESCRIPT_CONFIG_NAME ??= env['config']; const configPath = (() => { if (options.config) {