Skip to content

Dumb question: why bundle server external dependencies? #74614

Answered by icyJoseph
infodusha asked this question in Help
Discussion options

You must be logged in to vote

I often find this a bit hard to explain, but theres's a claim that, bundling dependencies, can help with application performance.

The Next.js docs, make that statement here, https://nextjs.org/docs/app/building-your-application/optimizing/package-bundling:

Bundling external packages can significantly improve the performance of your application.

But they don't go in-depth, as to why would that be. Surely, a large monolith, or even, a small group of large files, that contain a lot of code from, who knows how many dependencies, is not that good?... well, a bundler can collect the dependencies, figure out what's used, minify, etc, and output way smaller files, that do not even need to load …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@infodusha
Comment options

Answer selected by infodusha
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants