Hey guys has anyone sha…

less than 1 minute read

Hey guys, has anyone shared scss across apps / libs with nx/angular CLI? I’m trying to use my primary color within a feature library. I got the scss within a shared library, but I can’t seem to get the import within the feature lib component scss working.

Responses:

You can add the path of the shared lib as Sass include path of your apps in angular.json: "stylePreprocessorOptions": { "includePaths": ["libs/shared"] } And then import your styles from your lib path: @import "ui/src/styles" Meaning your lib is libs/shared/ui

Wow, that was quick feedback. And it works. Thank you so much. Did not include the path within the preprocessor options.

You’re welcome :+1:

Awesome comment - I did not know this existed and always included ../../../../lib/ui/blaa.scss :thumbsup:

Updated: