Open bencooper222 opened 5 years ago
I think the real blocker on this is that css is all via styled-components right now which means it's not actually css and it's generated in JS
There's definitely ways to extract them - but yeah, that doesn't make it easier.
I not sure that's quite the case, but I could be wrong.
Here's a couple articles on how styled does it's magic (I'll post them in the VH slack for additional educational reading); all three cover how styled works rather than how to use it, and the second one starts roughly where the first ends and the third provides a general overview followed by more under-the-hood stuff that isn't covered by the first two: https://mxstbr.blog/2016/11/styled-components-magic-explained/ https://medium.com/@_jmoller/how-does-styled-components-work-under-the-hood-28cb035d48c6 https://medium.com/styled-components/how-styled-components-works-618a69970421
Most of the styling we use in vaken uses value interpolation pretty heavily so I don't think we'd be able to extract it without ripping out styled into dynamic imports everywhere.
The case from Slack:
It'll be supported once https://github.com/webpack-contrib/style-loader/pull/406 is published to the registry (and not, just on the master branch which also serves as their public documentation because that's just a great setup)