I have a monorepo Angular project. I want to make it easier to import variables.scss
, because otherwise I have to go up multiple times.
The project structure is next
projects
-- myApp
-- src
-- scss
-- _variables.scss
What I've done so far is I placed in angular.json
icnludePaths
...
"myApp": {
...
"root": "projects/myApp",
"sourceRoot": "projects/myApp/src",
"architect": {
"build" {
...
"options": {
...
"stylePreprocessorOptions": {
"includePaths": ["src/scss"]
}
}
...
}
}
Then I specify in component's styles
@import "variables"
The PhpStorm is fine with that and shows no errors, however when I build my project there is an error that sass loader cannot resolve @import "variables"