If you go to https://enlight.nyc, the page will take a really long time to load the CSS. I think I'm doing something wrong with the optimization of the site.
Here's the GitHub repo: https://github.com/TryEnlight/site
I tried to load the components before the css, but I still don't see any changes. The site is hosted on Netlify and is fast when I serve locally.
I'd appreciate any insights to solve this problem. Thank you!
You need to add https://www.gatsbyjs.org/packages/gatsby-plugin-styled-components/?=styled so that your styles are extracted during the build and added to the generated HTML files.
Good luck!
Thanks so much for this answer @KyleAMathews. Found this while googling trying to solve the same issue and it worked :)
Most helpful comment
You need to add https://www.gatsbyjs.org/packages/gatsby-plugin-styled-components/?=styled so that your styles are extracted during the build and added to the generated HTML files.
Good luck!