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:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user