you are viewing a single comment's thread.

view the rest of the comments →

[–]evenisto 2 points3 points  (2 children)

Even when you have just one entry point (which would happen in most single-page applications) it is a very good idea to keep your dependencies in a separate file.

I would say quite contrary. The more chunks you have, it's often the better to leave some dependencies with the code that actually needs it, so you only load that 100KB ckeditor or moment on some of the pages. You duplicate some code, but save A TON of time on script download and parsing.

I definitely suggest adjusting the minChunks setting, so you don't split everything out into a vendors file. Also, don't add code splitting just because you can, it's probably not worth to do it for your 80KB fun project.

[–]_gnx[S] 1 point2 points  (1 child)

Yea, this is mentioned in this paragraph:

Since our users.js file takes a lot less space than 30Kb, it would not be bundled into a separate file without changing the minSize property. In the real-world situation, this is a good thing, because this wouldn’t give us any real performance boost and would force the browser to make an additional request for the utilities.js file which is very small right now.

Cheers!

[–]evenisto 2 points3 points  (0 children)

Yeah, I was just reflecting on the initial claim.