-
-
Save testacode/8efb09eba940e7ca6ea6738c2b86c15f to your computer and use it in GitHub Desktop.
issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// eslint-disable-next-line import/no-extraneous-dependencies | |
const TerserJSPlugin = require('terser-webpack-plugin'); | |
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin'); | |
const PRODUCTION_MODE = 'production'; | |
process.env.BABEL_ENV = PRODUCTION_MODE; | |
process.env.NODE_ENV = PRODUCTION_MODE; | |
const baseConfig = require('./webpack.base'); | |
// Override some configuration for development environment | |
const prodConfig = { | |
...baseConfig, | |
mode: PRODUCTION_MODE, | |
devtool: 'nosources-source-map', | |
optimization: { | |
minimizer: [ | |
new TerserJSPlugin(), | |
new CssMinimizerPlugin() | |
] | |
} | |
}; | |
module.exports = prodConfig; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment