Repository navigation
如何关闭控制台文件大小输出(How to turn off console file size output) #20690
Replies: 2 comments
|
You can suppress Vite's informational build output while keeping warnings and errors: export default defineConfig({
logLevel: 'warn',
build: { reportCompressedSize: false },
})
References: https://vite.dev/config/shared-options.html#loglevel and https://vite.dev/config/build-options.html#build-reportcompressedsize Prepared with AI assistance and checked against the linked documentation. I have not reproduced your original project locally. |
|
新版 Vite 有 export default defineConfig({
build: {
logLevel: 'warn'
reportCompressedSize: false
}
})如果你的版本没有这个选项,就只能用顶层 另外那个表格本身几乎不耗时,真正拖慢构建的是 gzip 大小计算,你已经用 — |
Uh oh!
There was an error while loading. Please reload this page.
这部分信息非常多,会覆盖其他日志内容,并且我认为它应该也会影响打包速度。项目越来越大,打包速度也越拉越慢,所以想关掉它。但是没有从文档中获得关闭方式,只能关闭压缩后大小显示。
All reactions