Closed liuxiaofanRZ closed 1 year ago
配置如下
compression({ threshold: 1024 * 80 })
但打包时小于80kb的js文件也被压缩了:
具体复现流程:npm init vue@latest创建项目,只选择vue-router功能,引入了本插件并设置threshhold为80*1024,然后build。
npm init vue@latest
{ "dependencies": { "vue": "^3.3.4", "vue-router": "^4.2.2" }, "devDependencies": { "@vitejs/plugin-vue": "^4.2.3", "vite": "^4.3.9", "vite-plugin-compression2": "^0.10.0" } }
看起来确实是插件的问题。我会尽快进行修复感谢你的反馈
我对其进行了修复并且发布了v0.10.1. @liuxiaofanRZ
v0.10.1
非常感谢~
Bug report 🐞
配置如下
但打包时小于80kb的js文件也被压缩了:
具体复现流程:
npm init vue@latest
创建项目,只选择vue-router功能,引入了本插件并设置threshhold为80*1024,然后build。Version & Environment