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.

19 satır
704B

  1. const CompressionWebpackPlugin = require('compression-webpack-plugin');
  2. module.exports = {
  3. productionSourceMap: false,
  4. transpileDependencies: ['element-ui'], // 需要兼容IE10要放开这个
  5. chainWebpack: config => {
  6. config.plugin('html').tap(options => {
  7. options[0].title = '经发局考核管理系统';
  8. return options;
  9. });
  10. if (process.env.NODE_ENV === 'production') {
  11. config.plugin('compressionPlugin').use(new CompressionWebpackPlugin({
  12. test: /\.(js|css|less)$/,
  13. threshold: 10240, // 对超过10kb的文件压缩
  14. deleteOriginalAssets: false
  15. }));
  16. }
  17. }
  18. }