Add package for consuming Blazor framework assets#58721
Conversation
Haven't looked at the PR yet, but we should probably name it in a way that is related to the framework reference and include It might also be interesting if we find a way of precluding explicit consumption through a package reference (we can have MSBuild logic to potentially detect that scenario). |
| <Description>ASP.NET Core static framework assets</Description> | ||
| <PackageId>Microsoft.AspNetCore.Assets.Pack</PackageId> | ||
| <IsPackable>true</IsPackable> | ||
| <OutputType>Library</OutputType> |
There was a problem hiding this comment.
Why not? This is not producing any exe/dll
There was a problem hiding this comment.
Wanted to make sure it's intentional, I don't know off the top of my head if this controls any behavior we care about
There was a problem hiding this comment.
No, it's conceptually a library
d65dd82 to
fa5f52d
Compare
| <Error | ||
| Condition="'@(_MissingBlazorJSFile)' != ''" | ||
| Text="'%(_MissingBlazorJSFile.Identity)' does not exist. Run 'npm run build' in the repo root to generate the file." /> |
There was a problem hiding this comment.
I'm having troubles getting this to build inside the VMR. Don't we need something similar to
as a fallback?There was a problem hiding this comment.
OK my issue with building this inside the VMR is unrelated to this change. But I wonder if a fallback should still get added as the other project has it.
|
So with this change I can't build the repo anymore if I don't have nodejs installed. Is that intentional? |
Adds a new package
Microsoft.AspNetCore.Assets.Pack(final package name open for discussion), which includes Blazor framework files as static web assets. A follow-up change in the SDK will add an implicit reference to this package in any Blazor project targeting .NET 10 or later.This change means that
blazor.*.jsfiles will get compressed and fingerprinted automatically.Fixes #58783