So Im trying to create my own style library so that I can import it in all my projects instead of spamming the files over and over again in all projects.
My components are react and styled with Sass. The thing is I use themes with Sass, from a tutorial I found only, that enables me to change a prop in the html “body” and changes the theme for all my components at once.
I’m now having trouble because, if I have the components spammed in my projects it works perfectly. If I try to the the library, I can not create new themes, since it does not apply them. After some analysis I see that Sass code gets compiled down to css in my lib and therefore I can no longer use Sass for theming in my projects. This would only work now if I put all the themes in my lib.
Is it possible to “prevent” sass compilation and import the lib in a project while maintaining its sass styles? I’ve been trying both with rollup and vite with no luck