Skip to content

Commit

Permalink
🐛 Fix watch option recognition with multiple compilers
Browse files Browse the repository at this point in the history
  • Loading branch information
saschagehlich authored and jbarrus committed May 16, 2016
1 parent 326c817 commit 141ebf0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/webpack.js
Expand Up @@ -28,7 +28,10 @@ function webpack(options, callback) {
}
if(callback) {
if(typeof callback !== "function") throw new Error("Invalid argument: callback");
if(options.watch === true) {
if(options.watch === true || (Array.isArray(options) &&
options.some(function(o) {
return o.watch;
}))) {
var watchOptions = (!Array.isArray(options) ? options : options[0]).watchOptions || {};
// TODO remove this in next major version
var watchDelay = (!Array.isArray(options) ? options : options[0]).watchDelay;
Expand Down

0 comments on commit 141ebf0

Please sign in to comment.