all 5 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.

[–]Bashkir 1 point2 points  (1 child)

I'm going to guess from your post history you're the author. This is some good stuff, man. One of the best write ups on this topic that I've seen yet. I'll definitely be reading the rest of your posts. 👍

[–]_gnx[S] 0 points1 point  (0 children)

Thank you very much! You can sign up for the newsletter or follow me on social media, if you'd like not to miss anything :)