Tree-shaking enabled and verified
Why it matters
When tree-shaking is disabled or ineffective, every utility your bundler pulls in ships in full — including the 95% of lodash or date-fns that your code never calls. On a typical project that imports from 10–15 large libraries, inactive tree-shaking can add 200–400KB of dead code to the production bundle. ISO 25010:2011 resource-utilisation captures the storage and bandwidth waste; the user-facing cost is slower parse and execution time on every visit.
Severity rationale
High because ineffective tree-shaking silently inflates the production bundle with unused code, adding hundreds of kilobytes that slow parse time for every visitor without any obvious error signal.
Remediation
Switch to ES module named imports for every large dependency and ensure your build runs in production mode. Add "sideEffects": false to your own package.json so downstream bundlers can tree-shake your code too.
// Before (imports all of lodash)
import _ from 'lodash'
// After (tree-shakeable — only debounce bundled)
import { debounce } from 'lodash-es'
In package.json, add:
{ "sideEffects": false }
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Performance Deep Dive Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- iso-25010:2011 · time-behaviour — Time Behaviour (performance efficiency)
- iso-25010:2011 · performance-efficiency.resource-utilization — Resource Utilisation (performance efficiency)
Taxons
History
- 2026-04-18·v1.0.0·Initial import from performance-deep-dive·automated