How to include bootstrap or other css library files in .bundle.scp.css #35898
Labels
area-blazor
Includes: Blazor, Razor Components
area-mvc
Includes: MVC, Actions and Controllers, Localization, CORS, most templates
feature-css-isolation
This issue is related to CSS Isolation feature
✔️ Resolution: Answered
Resolved because the question asked by the original author has been answered.
question
Status: Resolved
Reference:
dotnet/AspNetCore.Docs#16837
dotnet/AspNetCore.Docs#20931
Documentation
1.) How to include bootstrap or other css library files in .bundle.scp.css
This documentation says:
In my case the css in wwwroot is not not included in the bundle file. To reference wwwroot css in my project I have to the second link shown below in the consuming project:
In the file produced in obj/debug/net5.0/scopedcss/projectbundle/MyComponent/MyComponent.bundle.scp.css there is no reference to the wwwroot files. Here is the exact content:
I tried using
dotnet pack
as indicated in the documentation and referencing the nuget in the host project. It makes no difference. Currently I am referencing the RCL as a project so I can develop usingdotnet run watch
. Is this supported?2.) How to isolate wwwroot level css libraries in RCL projects
This may be answered by #1 above however I want to ask specifically. My host project uses an older version of bootstrap and those styles are affecting my control.
The text was updated successfully, but these errors were encountered: