* Applies an array of webpack blocks only if `process.env.NODE_ENV` matches the * given `envName`. If no `NODE_ENV` is set, it will be treated as 'development'. * * @param {string} envName Environment name like 'development', 'production' or 'testing'. * @param {Function[]} configSett
(envName, configSetters)
| 12 | * @return {Function} |
| 13 | */ |
| 14 | function env(envName, configSetters) { |
| 15 | assertConfigSetters(configSetters) |
| 16 | |
| 17 | const currentEnv = process.env.NODE_ENV || 'development' |
| 18 | |
| 19 | if (currentEnv !== envName) { |
| 20 | return () => config => config |
| 21 | } else { |
| 22 | return group(configSetters) |
| 23 | } |
| 24 | } |
no test coverage detected