trivago/parallel-webpack

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

Open

#88 ouverte le 15 oct. 2018

Voir sur GitHub
 (2 commentaires) (0 réactions) (0 assignés)JavaScript (108 forks)batch import
enhancementhelp wanted

Métriques du dépôt

Stars
 (1 486 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

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

Guide contributeur