diff --git a/bin/convert-argv.js b/bin/convert-argv.js index 901a6e5da45..c66de36ecd2 100644 --- a/bin/convert-argv.js +++ b/bin/convert-argv.js @@ -104,9 +104,13 @@ module.exports = function(yargs, argv, convertOptions) { var requireConfig = function requireConfig(configPath) { var options = (function WEBPACK_OPTIONS() { - if (argv.configRegister.length) { + if (argv.configRegister && argv.configRegister.length) { + module.paths.unshift( + path.resolve(process.cwd(), "node_modules"), + process.cwd() + ); argv.configRegister.forEach(dep => { - require(dep); + return require(dep); }); return require(configPath); } else { diff --git a/docs/AddGenerator.html b/docs/AddGenerator.html index 9ee74a16e78..568e7f4d8c1 100644 --- a/docs/AddGenerator.html +++ b/docs/AddGenerator.html @@ -192,7 +192,7 @@