4 ms·
> what genius came up with the idea of inlining styles in a javascript bundle to begin with? I do this in a project and it's terrific. The JS files in question
by fenomas 9y ago
> what genius came up with the idea of inlining styles in a javascript bundle to begin with?
I do this in a project and it's terrific. The JS files in question are front-end components (for Vue.js in my case), and the point of having the styles inline is so that components can be a single file, styles can be prefixed to be local to that component, and so on. It's light-years easier to work with than trying to do something similar without a module bundler.
- nobleach 9y agoBecause there are instances where one doesn't want to block rendering with large CSS file downloads? For above the fold content, inlining makes perfect sense.