Webpack modes also manage NODE_ENV

We don't need to manually define `NODE_ENV` in the Webpack config, nor do we
need to set it outside Webpack with `cross-env` either, as Webpack's modes will
take care of this for us.
This commit is contained in:
J. Ryan Stinnett 2020-07-17 14:18:05 +01:00
parent 398033e7ce
commit 8ae4298637
3 changed files with 2 additions and 49 deletions

View file

@ -296,12 +296,6 @@ module.exports = (env, argv) => {
},
plugins: [
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify(process.env.NODE_ENV),
},
}),
// This exports our CSS using the splitChunks and loaders above.
new MiniCssExtractPlugin({
filename: 'bundles/[hash]/[name].css',