-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[Blazor] Fingerprint all assets #41244
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
Merged
javiercn
merged 11 commits into
main
from
javiercn/static-web-asset-endpoints-fingerprints-all-assets
Jun 7, 2024
Merged
[Blazor] Fingerprint all assets #41244
javiercn
merged 11 commits into
main
from
javiercn/static-web-asset-endpoints-fingerprints-all-assets
Jun 7, 2024
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 task
MackinnonBuck
approved these changes
Jun 5, 2024
Member
MackinnonBuck
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking great to me. Mostly minor suggestions/questions.
src/StaticWebAssetsSdk/Tasks/ResolveStaticWebAssetEndpointRoutes.cs
Outdated
Show resolved
Hide resolved
test/Microsoft.NET.Sdk.Razor.Tests/StaticWebAssetEndpointsIntegrationTest.cs
Show resolved
Hide resolved
2a67421 to
35e4615
Compare
* Cache immutable max-age=31536000 (1 year) * Cache media (images, videos, audio) max-age=3600 (1 hour) * Make caching configurable per content type
35e4615 to
830517f
Compare
spadapet
added a commit
to dotnet/maui
that referenced
this pull request
Feb 22, 2025
… bundles (#27788) ### Description of Change This is for MAUI Blazor Hybrid apps. CSS Hot Reload from Visual Studio wasn't working for scoped CSS files that come from Razor Class Libraries. During the build, the scoped CSS files get built into a bundle called: * `LibraryName.<fingerprint>.bundle.scp.css` At runtime, CSS Hot Reload will trigger a scoped CSS build, which outputs: * `LibraryName.bundle.scp.css` Fingerprints are not included during that part of the build. This fix will match the original fingerprinted name to the newly built name and allows CSS hot reload to work. This was the PR that introduced fingerprinting: * dotnet/sdk#41244 ### Issues Fixed * [Bug 2272902](https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2272902): [MAUI][Hot Reload] The web page doesn't apply the changes in RazorClassLibrary\xx.razor.css file after referencing RazorClassLibrary App from MAUI Blazor App
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Area-AspNetCore
RazorSDK, BlazorWebAssemblySDK, dotnet-watch
untriaged
Request triage from a team member
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds support for fingerprinting assets
RelativePathof assets.?or!. These modifiers determine how the file is addressable in standalone scenarios.?signifies that the file will not have its name replaced to add the expression.!signifies that the file will have its name replaced to add the expression.{.fingerprint=value}syntax, which makes it so that value takes precedence when reducing the expression to its literal form.Scoped CSS
Other assets