Browse Source
Webpack environment `mode` is defined directly in our environment specific webpack config files. Due to this, we no longer need to manually set `NODE_ENV` or check to ensure that it has been set. See: - https://webpack.js.org/concepts/mode/renovate/lint-staged-8.x
Tom Kirkpatrick
7 years ago
5 changed files with 0 additions and 24 deletions
@ -1,12 +0,0 @@ |
|||
// @flow
|
|||
import chalk from 'chalk' |
|||
|
|||
export default function CheckNodeEnv(expectedEnv: string) { |
|||
if (!expectedEnv) { |
|||
throw new Error('"expectedEnv" not set') |
|||
} |
|||
|
|||
if (process.env.NODE_ENV !== expectedEnv) { |
|||
throw new Error(chalk.whiteBright.bgRed.bold(`"process.env.NODE_ENV" must be "${expectedEnv}" to use this webpack config`)) |
|||
} |
|||
} |
Loading…
Reference in new issue