News for hackers. Stuff that matters.
Re:Webpack 4 Beta released by WorldMaker on Friday January 26, 2018 @12:37PM (#16241074)
You can use it to lazy load CSS/images/anything you have a webpack loader for. Some of the loaders like CSS can't help but be sideeffect-full, so lazy loading them isn't always the best plan, but it certainly is possible.

> If so, what does this improve? Time to first paint? Time to first interaction? Time to DOM ready?

Could be any or all of those, yes, depending on architecture. Webpack bundles CSS, images, etc into combined JS files ("chunks"), tries to get the important hot path stuff into the first chunk, and then load other chunks as needed. With dynamic loading you can further make sure that additional chunks load out of the hot path, after first paint/first interaction/DOM ready/whatever else.

There are no comments on this comment yet.