-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CSS is not included in pack of multi-targeted library #224
Comments
BTW doing a |
So what command is being used exactly? MudBlazor/MudBlazor#10643 was merged in the meantime, does that mean you are fine with this solution? It seems to me to be less of a hack than determining the CSS files to be included from the contents of |
dotnet pack -c Release Had to be reverted as it caused duplicate asset errors We are currently using 1.83.0 and living with the occasional file contention errors. I dont have bin logs only normal diag build logs. We have decided to fork in order to support multi-targeted build/publish. We already have a working template in https://github.com/MudBlazor/JSCompiler
We dont beleive this to be a hack if done correctly. |
Describe the bug
Please see #218 for context
That PR fixed a race condition that could lock input/output files when dart-sass was running concurrently.
For example when dotnet packing a multi-targeted build.
By adding the mutex it seems that although the race condition with regards to file locking is fixed, ocassionally the css was not included in
dotnet pack
. It appears depending on which framework was building the css it might not get included.I am assuming this is due to the
--update
flag of dart sass which will result in no stdout when building the scss --> css a second time.Also related #178
My theory is that this behaviour is to do with the logic that msbuild uses to pickup the staticwebassets for packing in a Blazor library.
Presumably the way in which the staticwebassets is determined is somehow tied to one of the frameworks in a multi-target library.
To test this theory I set our project to unconditionally add
MudBlazor.min.css
after SassCompiler had run.See MudBlazor/MudBlazor#10643
To Reproduce
Steps to reproduce the behavior:
Download HEAD of MudBlazor (uses SassCompiler 1.83.0 no mutex)
Always includes
MudBlazor.min.css
indotnet pack
Update SassCompiler package to 1.83.1
Sometimes omits
MudBlazor.min.css
indotnet pack
Download Build: Fix for missing MudBlazor.min.css in SassCompiler MudBlazor/MudBlazor#10643
Always includes
MudBlazor.min.css
indotnet pack
Expected behavior
Always includes
MudBlazor.min.css
indotnet pack
Solution
Determine output css from
sasscompiler.json
. And always include in theContent Items
. For folders this would require a bit of logic.I can do a PR if required.
The text was updated successfully, but these errors were encountered: