isomorphic-style-loader icon indicating copy to clipboard operation
isomorphic-style-loader copied to clipboard

Support for critical css without css modules

Open pastelsky opened this issue 8 years ago • 2 comments

Not every project uses css modules and there are signs that the react team are against using css modules. Does this library support critical css when components import css like

import component/mystyle.css

Theoretically speaking, it should be possible to find out which components are rendered above the fold, and then resolve css imports from those components into critical path css.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/36281242-support-for-critical-css-without-css-modules?utm_campaign=plugin&utm_content=tracker%2F26439769&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F26439769&utm_medium=issues&utm_source=github).

pastelsky avatar Jul 23 '16 06:07 pastelsky

@pastelsky You strongly misunderstood goal of create-react-app. Facebook react team are NOT against CSS-modules, they are simply trying to create generic and workflow agnostic (I'm talking about webpack) application in create-react-app project. So since they are going to remove webpack at all in the future they can not support CSS-modules loader.

Back to your question: if you are happy with weback you should not to worry about CSS-modules or isomorphic-style-loader and your improve suggestion will not change create-react-app team point of view - neither ours.

Everettss avatar Jul 24 '16 17:07 Everettss

css modules is now supported in create-react-app - that article that was linked is outdated now

jooj123 avatar Feb 15 '18 04:02 jooj123