-
SummaryI mean there is an option Additional informationNo response ExampleNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
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:
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 other, or as many, modules, which is a benefit, because in Node.js, the more files you need to load, the slower the startup time is. And that's what some packing tools try to do, bring everything into one file, for example: https://github.com/vercel/ncc So you want to bundle, to keep things tidy, small, and reduce start-up time. |
Beta Was this translation helpful? Give feedback.
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:
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 …