webpack-contrib/config-loader

Webpack function config is not called with CLI arguments

Demivan opened this issue · 2 comments

In https://github.com/webpack-contrib/config-loader#gotchas it is specified that webpack function will be called with argv parameter, but it does not actually work. There is related issue webpack-contrib/webpack-command#23.

  • Operating System: Windows 10
  • Node Version: 9.11.1
  • NPM Version: 5.6.0
  • webpack Version: 4.10.0
  • config-loader Version: 1.0.0

Expected Behavior

Function should be called with arguments passed to CLI.

Actual Behavior

Function is called without arguments.

Code

module.exports = function (argv) {
  const production = argv.mode === 'production'
  ...
}

How Do We Reproduce?

Export function from webpack config that uses argv parameter.

Thanks for the issue 🍺

Should have a fix out in a few minutes.

v1.1.3 published