4 ms·
I tweeted “A 250 KB render-blocking bundle.js in <head> which also includes all the CSS and SVG files?” in response to that video, and didn’t get a good answer.
by SimeVidas 10y ago
I tweeted “A 250 KB render-blocking bundle.js in <head> which also includes all the CSS and SVG files?” in response to that video, and didn’t get a good answer. If anyone here wants to respond, I’m interested to know more :)
- evan_ 10y agoIf that bothers you, you can make the entry file be a tiny do-nothing loader module that dynamically loads other modules when the page is ready. Chunking files in this manner is trivially easy. You can also separate CSS and SVGs and whatever else you want into external files using the external file plugin. Finally- there's no reason you need to load the bundle in <head>.
- SimeVidas 10y agoHm, a big render-blocking bundle in <head> seems like such an obvious anti-pattern. “If that bothers you” makes it seem like I’m nitpicking, but this is a huge issue, I think.
- evan_ 10y agoIf your entire app is rendered by JavaScript then it doesn't matter. also you don't need to make it a blocking script tag in your <head>, you could load it at the end of <body>, it doesn't prescribe anything.
- deleted 10y ago[deleted]