react-with-moxy
react-with-moxy copied to clipboard
Add a CSS link tag for each route
We are now using https://github.com/webpack-contrib/mini-css-extract-plugin which is able to generate a CSS per entry point. Though, this was causing FOUC. The reason for this is that we are not including the CSS for each route. We need to copy up with a solution that associates routes (async entry-points) to the outputted CSS assets and include them in index.html.js.
For now, I will revert to generate a single CSS file like we were doing before.
Once we find the correct strategy to do what's described in the issue, we may manually revert some parts of these commits:
- https://github.com/moxystudio/react-with-moxy/commit/1d6f418879d83ab4b21b617cf63bb5f918bc826a
- https://github.com/moxystudio/react-with-moxy/pull/114/commits/28646ea5ab6a296c3b51cd89c631793b3714422c