PSA: embedding/applying CSS in JS is the surefire way to be on every slow path. Bloats memory, slows parsing & use, hurts caching. Avoid.
-
-
create-react-app extracts embedded CSS using that plugin by default. I'm not sure what conditional CSS in split out bundles do.
@dan_abramov -
If it’s outside the main chunk then it’ll be added as a <script> tag with styles from the split out chunk’s JS code.
- 2 more replies
New conversation -
-
-
bundling JS is the only default in webpack.
-
there exists solutions for css-in-js bundles and separate CSS bundles alike
- 2 more replies
New conversation -
-
-
I always use ExtractTextPlugin (wish it was default). CLIs like Vue default to using it in their main templates that use Webpack.
-
I'm surprised to hear people _don't_ use ExtractTextPlugin, seems like a safer default
- 8 more replies
New conversation -
-
-
That is not too terrible since webpack allows you to extract it out to its own CSS file at the end if you choose to. I think everyone should
-
Few wins I noticed from importing CSS modules in JS is that the extracted CSS file does not have a bunch of unused CSS by default.
- 3 more replies
New conversation -
-
-
mental model: n resources in, 1 bundle out. Plugins do the split
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
& Web Standards TL; Blink API OWNER
Named PWAs w/
DMs open. Tweets my own; press@google.com for official comms.