Skip to content

Commit 141ebf0

Browse files
saschagehlichJeffrey Barrus
authored and
Jeffrey Barrus
committed
🐛 Fix watch option recognition with multiple compilers
1 parent 326c817 commit 141ebf0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/webpack.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ function webpack(options, callback) {
2828
}
2929
if(callback) {
3030
if(typeof callback !== "function") throw new Error("Invalid argument: callback");
31-
if(options.watch === true) {
31+
if(options.watch === true || (Array.isArray(options) &&
32+
options.some(function(o) {
33+
return o.watch;
34+
}))) {
3235
var watchOptions = (!Array.isArray(options) ? options : options[0]).watchOptions || {};
3336
// TODO remove this in next major version
3437
var watchDelay = (!Array.isArray(options) ? options : options[0]).watchDelay;

0 commit comments

Comments
 (0)