Can Razor Class Library pack static files (js, css etc) too?

后端 未结 7 1817
陌清茗
陌清茗 2020-11-30 01:50

Maybe duplicate of this already, but since that post does not have any answer, I am posting this question.

The new Razor Class Library is awesome, but it cannot pack

7条回答
  •  囚心锁ツ
    2020-11-30 02:18

    Please take note that this solutions provided will only work for server side applications. If you are using Blazor client side it will not work. To include static assets on Blazor client side from a razor class library you need to reference directly the assets like this:

    
    

    I wasted hours trying to figure out this. Hope this helps someone.

提交回复
热议问题