Skip to content
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

Fix CSS Hot Reload - Handle fingerprint when hot reloading scoped CSS bundles #27788

Merged
merged 2 commits into from
Feb 22, 2025

Conversation

spadapet
Copy link
Contributor

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:

Issues Fixed

  • Bug 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

@Copilot Copilot bot review requested due to automatic review settings February 14, 2025 00:16
@spadapet spadapet requested a review from a team as a code owner February 14, 2025 00:16
@spadapet spadapet self-assigned this Feb 14, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

@spadapet spadapet changed the title Handle fingerprint when hot reloading scoped CSS bundles Fix CSS Hot Reload - Handle fingerprint when hot reloading scoped CSS bundles Feb 14, 2025
@spadapet spadapet force-pushed the dev/peterspa/HotReloadCssWithThumbprint branch from 88463b7 to 25ac339 Compare February 14, 2025 18:41
@rmarinho rmarinho added the area-tooling XAML & C# Hot Reload, XAML Editor, Live Visual Tree, Live Preview, Debugging label Feb 17, 2025
@spadapet spadapet enabled auto-merge February 20, 2025 19:46
@spadapet
Copy link
Contributor Author

Ping for code review: @dotnet/dotnet-maui-blazor-eng

@spadapet spadapet force-pushed the dev/peterspa/HotReloadCssWithThumbprint branch from 82c7f0b to b432f33 Compare February 21, 2025 17:44
@spadapet spadapet merged commit 7727102 into main Feb 22, 2025
123 checks passed
@spadapet spadapet deleted the dev/peterspa/HotReloadCssWithThumbprint branch February 22, 2025 17:27
@github-actions github-actions bot locked and limited conversation to collaborators Mar 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-tooling XAML & C# Hot Reload, XAML Editor, Live Visual Tree, Live Preview, Debugging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants