diff options
Diffstat (limited to 'node_modules/webpack/bin/convert-argv.js')
-rw-r--r-- | node_modules/webpack/bin/convert-argv.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/node_modules/webpack/bin/convert-argv.js b/node_modules/webpack/bin/convert-argv.js index 043ea2abb..db68f76a6 100644 --- a/node_modules/webpack/bin/convert-argv.js +++ b/node_modules/webpack/bin/convert-argv.js @@ -166,12 +166,12 @@ module.exports = function(yargs, argv, convertOptions) { options.watchOptions.aggregateTimeout = +argv["watch-aggregate-timeout"]; } - if(argv["watch-poll"]) { + if(typeof argv["watch-poll"] !== "undefined") { options.watchOptions = options.watchOptions || {}; - if(typeof argv["watch-poll"] !== "boolean") - options.watchOptions.poll = +argv["watch-poll"]; - else + if(argv["watch-poll"] === "true" || argv["watch-poll"] === "") options.watchOptions.poll = true; + else if(!isNaN(argv["watch-poll"])) + options.watchOptions.poll = +argv["watch-poll"]; } if(argv["watch-stdin"]) { @@ -537,7 +537,7 @@ module.exports = function(yargs, argv, convertOptions) { if(i < 0 || (j >= 0 && j < i)) { var resolved = path.resolve(content); if(fs.existsSync(resolved)) { - addTo("main", resolved); + addTo("main", `${resolved}${fs.statSync(resolved).isDirectory() ? path.sep : ""}`); } else { addTo("main", content); } |