Skip to content

Commit 91aa7dd

Browse files
authored
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'.
1 parent 36cb222 commit 91aa7dd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bin/cmd.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ program
5252
startServer();
5353
return; // early terminate, don't build
5454
};
55-
build.watch(cmd, program.config, function(err, stats) {
55+
56+
const { config: userWebpackConfig, babelrc: useBabelrc = true} = program;
57+
build.watch(cmd, {userWebpackConfig, useBabelrc}, function(err, stats) {
5658
if (err) {
5759
console.error(err);
5860
return;

0 commit comments

Comments
 (0)