webpack.prod.js 495 B

1234567891011121314151617181920212223
  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. }),
  19. ],
  20. },
  21. })
  22. )