I have a problem with the SCSS path. I have a folder structure. You can see it first image. The problem is that I imported all scss in app.scss. Files of components work, but pages of components don't read mixin and variables. First of all, I thought that It's a syntax error but I could not find it.
My app.scss
@import "./abstracts/variables.scss";
@import "./abstracts/mixins.scss";
@import "./components/Header.module.scss";
@import "./components/Footer.module.scss";
@import "./pages/Home.module.scss";
If I write $mainColor in Header.module.scss, there is no problem and the app works. But in pages folder, I have to write @import and I don't want to write it.
Home.module.scss
@import "../abstracts/variables.scss";
@import "../abstracts/mixins.scss";
.main-section {
.main-section-context {
@include flex-box(center, center);
}
}
If I deleted import , the screen gives
SassError: Undefined mixin.
╷
13 │ @include flex-box(center, center);
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
╵
styles\pages\Home.module.scss 13:5 root stylesheet
