For example if I have the following structure:
component-library > src > lib
Inside the lib folder I have a styles folder and a button component folder
Now in the styles folder I have declared a styles.scss file and a mixins folder.
In the mixins folder I declare some mixins which I then import to use in the button component as well as other components but the issue I am facing right now is that every time I run ng-build to build the lib.
Errors are being thrown. for example:
ERROR: Undefined mixin. ╷ 7 │ @include mixin-name; │ ^^^^^^^^^^^^^^^^^^^^^ ╵
src\lib\button\button.component.scss 7:3 root stylesheet An unhandled exception occurred: Undefined mixin. ╷ 7 │ @include button-reset; │ ^^^^^^^^^^^^^^^^^^^^^ ╵
What do I need to configure different to achieve this as if I was ng building an actual angular application? I have read that library is built differently compared to the actual app.
Any solutions to get around this or do I need a different approach to this? Like for example wherever I need to use that mixin, I'd need to duplicate the styles multiple times in every component?