Heavy dependencies
Some libraries are heavy enough that pulling one in for a small feature dominates your bundle and brings its own performance footguns — 3D engines that leak GPU memory, animation libraries that read layout every frame, date libraries many times larger than the native alternative. AI agents reach for whatever library they’ve seen most, so a marketing page ends up shipping a full charting or animation runtime for one small effect.
Symptoms
How VibeCheck catches it
In your widget · Problems
To your coding agent · MCP
The same string in your widget and in your agent’s context — no screenshot, no copy-paste.
Root causes
The fix
For each heavy library, decide: replace it with a native API or a lighter alternative, import only the slice you need so tree-shaking works, or lazy-load it so it’s fetched only when the feature is actually used. Confirm resources are disposed on unmount.
- Identify the heavy library and how much of it you actually use
- Replace with a native/lighter option, or import a tree-shakeable subset
- If it must stay, lazy-load it and dispose its resources on teardown
// ✗ Moment.js (~70KB) for one formatted date
import moment from 'moment'
moment(d).format('LL')
// ✓ native Intl — zero bytes shipped
new Intl.DateTimeFormat('en', { dateStyle: 'long' }).format(d)FAQ
- Which libraries does VibeCheck flag?
- It fingerprints 16 known-heavy libraries — 3D engines, animation runtimes, charting, CSS-in-JS, date and utility libraries — by their globals, DOM markers, or script URLs, and reports the weight plus that library’s common pitfalls.
- Do I have to remove the library?
- Not necessarily. Often lazy-loading it (so only users who need the feature download it) or importing a lighter subset is enough. Removal only makes sense when a native API or a much smaller package fully covers your use.
- What’s the single most common heavy dependency?
- Date libraries and animation runtimes. Moment.js is a classic — the native
Intl.DateTimeFormatreplaces most of it for zero bytes — and animation libraries are frequently shipped in full when a tree-shaken or lazy subset would do.