Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

Can you access razor class library static content from inside the consuming project at build time?

$
0
0

When importing a Razor Class Library to a blazor app (or mvc I guess) is it possible to get to assets that come from that RCL from within the blazor app. I'm specifically interested in if it possible to take the CSS assets from the RCL and bundle/combine them into a single CSS file for the app?

Some more background info on the problem. We have an internal RCL that uses TailwindCSS as it's CSS library. We would also like to use Tailwind in the main Blazor app. The thing that we would like to avoid if possible is each app using Tailwind will scan it's own files to search for CSS classes that are being used and produce it's own CSS file. These files will likely have a large amount of cross over in terms of classes that are used, this will lead to the app having 2 copies of the classes in 2 CSS files that users have to download.

We would like, if possible, to be able to either combine the CSS files from the Blazor app and the RCL or at the least include the RCLs CSS file in the scanning done by Tailwind to discover classes that have been used so we can exclude them from the Blazor apps generated CSS thereby improving performance and our user experience.

Does anyone know if it's possible to do something like that or have any pointers that might help me move forward to the next step?

Happy to provide more information if needed.


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>