I wanted to play with all different types of styling methods in GatsbyJS. In my project, I have three types of implementing stylings, global CSS, CSS Modules and CSS-in-JS
(styled-component)
. Everything works as expected. But, when I build the project with gatsby build
and open one of the index.html where I did CSS-in-js I see that there is a CSS file in data-href
tag inside. When I open it, It contains all the CSS stylings of my project. But I didn't even import it to the component where I did CSS-in-js. Why would something like this happen? Why stylings from module.css
are being referred inside this file.
Asked
Active
Viewed 146 times
3

Mohamed Imran
- 651
- 7
- 20