feat(vite): 微信本地开发也执行图片压缩,执行太慢了,改为生产才用

This commit is contained in:
Burt 2024-01-12 17:05:29 +08:00
parent ad1207fb65
commit 2d4a96cbe8

View File

@ -65,6 +65,7 @@ export default ({ command, mode }) => {
}),
viteCompression(), // 会多出一些.gz文件如xxx.js.gz这里默认是不会删除xxx.js文件的如果想删除也可以增加配置
// 这个图片压缩插件比较耗时,希望仅在生产环境使用
mode === 'production' &&
viteImagemin({
gifsicle: {
// gif图片压缩