webpack 3.5.5 → 3.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -172,7 +172,7 @@ module.exports = function(yargs) {
172
172
  requiresArg: true
173
173
  },
174
174
  "watch-poll": {
175
- type: "boolean",
175
+ type: "string",
176
176
  describe: "The polling interval for watching (also enable polling)",
177
177
  group: ADVANCED_GROUP
178
178
  },
@@ -166,12 +166,12 @@ module.exports = function(yargs, argv, convertOptions) {
166
166
  options.watchOptions.aggregateTimeout = +argv["watch-aggregate-timeout"];
167
167
  }
168
168
 
169
- if(argv["watch-poll"]) {
169
+ if(typeof argv["watch-poll"] !== undefined) {
170
170
  options.watchOptions = options.watchOptions || {};
171
- if(typeof argv["watch-poll"] !== "boolean")
172
- options.watchOptions.poll = +argv["watch-poll"];
173
- else
171
+ if(argv["watch-poll"] === "true" || argv["watch-poll"] === "")
174
172
  options.watchOptions.poll = true;
173
+ else if(!isNaN(argv["watch-poll"]))
174
+ options.watchOptions.poll = +argv["watch-poll"];
175
175
  }
176
176
 
177
177
  if(argv["watch-stdin"]) {