Reputation: 99
Given a Nx monorepo (angular-cli) with the following layout
apps
-app1
-app2
libs
-shared
-feature1
-feature2
In the shared library resides a variables.scss file with variables for colors. The component stylesheets in the feature libraries import these variables. So far so good. Both app1 and app2 import the feature libs (lazy loaded)
Question: How can I override the color variables in order to render the feature components with different color for app1 and app2?
Upvotes: 3
Views: 916
Reputation: 33
My solution is including the styles.scss in the styles array of the app and then in the styles.scss file I'm importing the shared variables file. Adding variables after importing the file will override the shared variables.
Upvotes: 0