Back to list

Importing entire libraries instead of specific functions bloats bundle size

6/10 Medium

Developers commonly import entire libraries when only needing single functions, pulling in 70+ kilobytes of unused code (e.g., lodash). Combined with full icon libraries, moment.js for dates, and analytics packages with unwanted dependencies, this significantly increases bundle size and degrades performance.

Category
dependency
Workaround
solid
Stage
build
Freshness
persistent
Scope
framework
Recurring
Yes
Buyer Type
team

Sources

Collection History

Query: “What are the most common pain points with Next.js in 2025?3/27/2026

The most common culprit is importing entire libraries when you only need one function. For example, writing import from load dash pulls in 70 kilobytes when you probably only needed one 2 kilobyte function.

Created: 3/27/2026Updated: 3/27/2026