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:
parent
398033e7ce
commit
8ae4298637
3 changed files with 2 additions and 49 deletions
|
@ -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',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue