webpack.prod.js 521 B

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. )