Blogger Information
Blog 47
fans 0
comment 2
visits 102678
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
vue 前端打包 chunk-vendors文件过大的问题
拾一枝樱花的博客
Original
3905 people have browsed it
在 vue.config.js 文件中使用 webpack的 compressionPlugin 插件 对代码进行压缩切记 要开启删除源文件chainWebpack: (config) => {    // 生产环境,开启js\css压缩if (process.env.NODE_ENV === 'production') {  config.plugin('compressionPlugin').use(new CompressionPlugin({    test: /\.(js|css|less)$/, // 匹配文件名    threshold: 10240, // 对超过10k的数据压缩    minRatio: 0.8,    deleteOriginalAssets: true // 删除源文件  }))}

},

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post