trivago/parallel-webpack

`env` variable is not passed as first parameter to configuration function

Open

#88 建立於 2018年10月15日

在 GitHub 查看
 (2 留言) (0 反應) (0 負責人)JavaScript (1,486 star) (108 fork)batch import
enhancementhelp wanted

描述

Explain the problem

parallel-webpack is not passing an env parameter when configuration uses a function of the form:

module.exports = (env) => {
    console.log("env: ", env);  // Prints: env: {}
    return myConfig;  
} 

Expected Behaviour

A valid env should be passed as first parameter to the configuration function.

Actual Behaviour

env is an empty dictionary.

Steps to reproduce

  1. Install parallel-webpack locally (using yarn, in my case)
  2. Create a simple module with a configuration function of the form given above
  3. Invoke as shown below:
$ ./node_modules/.bin/parallel-webpack --env.production=true

Provide your Environment details

  • Node version: v8.12.0
  • Operating System: Ubuntu 14.04.1 LTS
  • webpack version: 4.16.5
  • parallel-webpack version: 2.3.0

貢獻者指南