I'm building a static site project using Gatsby. I've successfully installed the gatsby sass plugin and got sass to work, however, I could not get my custom sass variable file to properly imported into other component sass files.
Below is my folder structure:
`--src
-components
-header
-header.js
-header.sass
--layouts
-index.js
-index.sass
--pages
-page1.js
-page1.sass
--sass
-_color.sass
-_global.sass
-_mixins.sass
`
As shown above, I use custom 'sass' folder to store all the global variables and styles, and then import them to each of the component sass that needs them (I understand this might not be an conventional approach, but i'm still new to react and gatsby, and not quite familiar with other methods such as component css just yet). For example, if I need to access the color variables inside the 'page1.sass', i'd import the color sass file into page1.sass, and define the specific component style there. The problem is that in doing so, I am getting the "Undefined variable" error. I checked my import path and everything seems to be correct, i couldnt figure it out what went wrong. The strangest thing is that importing mixins seem to be working fine. This problem seems to be unique with importing sass variables. am I missing something here?