From 91aa7dd90e5a35cf6637a4cc1cc968f01a4cafe5 Mon Sep 17 00:00:00 2001 From: Jan Marten Date: Sat, 18 May 2019 11:05:45 +0200 Subject: [PATCH] Fix broken watch command The watch command needs the same additionalConfig parameters as the build command. This fixes the following error: TypeError: Cannot destructure property `userWebpackConfig` of 'undefined' or 'null'. --- bin/cmd.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/cmd.js b/bin/cmd.js index 98a5e01c..2b9a7cb1 100755 --- a/bin/cmd.js +++ b/bin/cmd.js @@ -52,7 +52,9 @@ program startServer(); return; // early terminate, don't build }; - build.watch(cmd, program.config, function(err, stats) { + + const { config: userWebpackConfig, babelrc: useBabelrc = true} = program; + build.watch(cmd, {userWebpackConfig, useBabelrc}, function(err, stats) { if (err) { console.error(err); return;