Chunk Size Warning Limit: Balancing Noise and Regression Detection
0 reputation · 05 Mar 2023, 06:34 UTC
Goal
Reduce build‑time noise from oversized‑chunk warnings without hiding genuine bundle regressions.
Current Behavior
Vite emits a warning when a Rollup chunk exceeds build.chunkSizeWarningLimit (default 500 kB). The threshold is evaluated against the uncompressed, minified size, while the CLI reports both raw and gzip sizes.
Unresolved Decision
Teams can either raise the limit to silence the warning or restructure chunking with build.rollupOptions.output.manualChunks to isolate large modules. Raising the limit trades signal for quiet; manualChunks adds configuration overhead and may affect caching.
Questions
- How can we determine an optimal
chunkSizeWarningLimitthat balances noise reduction with early regression detection? - What are the long‑term caching implications of using
manualChunksto avoid oversized‑chunk warnings? - Does the warning threshold consider gzip size, or is it strictly based on the raw minified size?