I have made an Angular library containing one component myComponent
. I can successfully build it and use it in my main application. I want to add the functionality of customizing some of the scss variables that are used in myComponent
by the consuming main application. I could not find any exhaustive guides on this topic. What I have so far:
- In my lib, i have a
theme.scss
file that contains the variables that i want to be customizable. It is properly exported along with the lib by setting theassets
value of theng-package.json
file. myComponent
uses the variables defined intheme.scss
.- however, when i build the lib, the resulting files in
dist
no longer have the relationship to thetheme.scss
file, as thescss
code is compiled byng build
. Therefore, changing the variables in the consuming app does nothing tomyComponent
.
Is it possible to get the desired behavior?