trivago/parallel-webpack

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

Open

#88 aperta il 15 ott 2018

Vedi su GitHub
 (2 commenti) (0 reazioni) (0 assegnatari)JavaScript (108 fork)batch import
enhancementhelp wanted

Metriche repository

Star
 (1486 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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

Guida contributor