How to share styles across publishable libs?
See original GitHub issueDescription
I have a monolithic app and now I split it into publishable libs which I am going to use in that app.
There are some common styles like variables and mixing in main app. And I want to reuse that styles into my libs.
I have tried to move styles into separate lib and I was able to reuse them in main app through configuration in angular.json (stylePreprocessorOptions
) but I can’t use these styles in other libraries.
Is there any ideas how can I manage this situation?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:31
- Comments:63 (4 by maintainers)
Top Results From Across the Web
Sharing styles between apps inside Nx workspace
Creating a lib for styles. The best solution for my case was to create a lib named ui for the styles: nx generate...
Read more >Best practices: components, styles, and shared libraries - Figma
Libraries : In Figma, you can share components and styles by publishing them. This turns your file into a library, so you can...
Read more >Angular 6 library shared stylesheets - Stack Overflow
Angular CLI generates a lib with a root component & component scss, but the styles added or imported to the root component are...
Read more >How to share Figma components across files - UX Collective
Once you click on “Enable libraries” under the “Team libraries” title you'll get a list of files that have published styles and components ......
Read more >How to share css among multiple angular projects? - Reddit
In one of my projects, I just build the styles myself and copy them to dist/ in the postbuild hook and package the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Honestly, I think we should have a built-in “@nrwl/angular:style-library” schematic or something like that. Having to guess and try various things is disappointing
I believe this is still an issue.