You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

webpack.prod.js 521B

123456789101112131415161718192021222324
  1. const { merge } = require('webpack-merge')
  2. const common = require('./webpack.common.js')
  3. const TerserPlugin = require('terser-webpack-plugin');
  4. module.exports = common.map(
  5. config => merge(config, {
  6. mode: 'production',
  7. devtool: '#source-map',
  8. // This is required to keep IE11 compatibility (see #21316)
  9. optimization: {
  10. minimize: true,
  11. minimizer: [
  12. new TerserPlugin({
  13. terserOptions: {
  14. output: {
  15. keep_quoted_props: true,
  16. },
  17. },
  18. sourceMap: true,
  19. }),
  20. ],
  21. },
  22. })
  23. )