Open donaldpipowitch opened 8 years ago
I'm not aware of a good way to do this.
The production build would use extract text plugin to load styles early, but I don't think there's a way to do this and still have CSS in the bundle hot reloaded
Maybe you could use the extract text plugin for development, too, and handle reloading of CSS just with a classic livereload server.
That sounds like it could work
Hi don't know if you guys have come across this? https://github.com/HumbleSpark/react-ssr-critical-styles this should sort out above the fold css
We can achieve this using jsdom-global package. We will add global dom environment into Node. Every time we prepare html to return, we can add the style tags into that html from jsdom-global. I will make some tweaks and see if it works.
Or you could have a look at https://github.com/gajus/usus.
When opening the app the app is initially unstyled, because the styles will be injected asynchronous. It would be nice to get rid of that.