-
Notifications
You must be signed in to change notification settings - Fork 10.4k
[Blazor] Remove HotReload built-into Blazor WebAssembly #62777
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
Conversation
Co-authored-by: maraf <10020471+maraf@users.noreply.github.com>
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.
Pull Request Overview
This PR removes the built-in HotReload functionality from Blazor WebAssembly.
- Deletes the WebAssemblyHotReload implementation and its initialization.
- Cleans up related MSBuild property and public API entries.
- Removes JavaScript/TypeScript interop methods for HotReload.
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
Microsoft.AspNetCore.Components.WebAssembly.props | Removed WebAssemblyHotReloadCapabilities MSBuild property |
PublicAPI.Unshipped.txt | Removed HotReload API entries |
PublicAPI.Shipped.txt | Removed HotReload API entries |
HotReload/WebAssemblyHotReload.cs | Deleted the entire HotReload implementation class |
Hosting/WebAssemblyHost.cs | Removed HotReload initialization block and unused usings |
src/Components/Web.JS/src/GlobalExports.ts | Removed TypeScript interface definitions for HotReload |
src/Components/Web.JS/src/Boot.WebAssembly.Common.ts | Removed JavaScript interop methods for HotReload |
@@ -80,7 +80,6 @@ Microsoft.AspNetCore.Components.WebAssembly.Hosting.WebAssemblyHostConfiguration | |||
Microsoft.AspNetCore.Components.WebAssembly.Hosting.WebAssemblyHostConfiguration.this[string! key].set -> void | |||
Microsoft.AspNetCore.Components.WebAssembly.Hosting.WebAssemblyHostConfiguration.WebAssemblyHostConfiguration() -> void | |||
Microsoft.AspNetCore.Components.WebAssembly.Hosting.WebAssemblyHostEnvironmentExtensions | |||
Microsoft.AspNetCore.Components.WebAssembly.HotReload.WebAssemblyHotReload |
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.
Instead of removing APIs from here, mark them as removed in PublicAPI.Unshipped.txt
Documentation says:
Removed APIs
A new entry needs to be added to the PublicAPI.Unshipped.txt file for a removed API. For example:
#nullable enable
*REMOVED*Microsoft.Builder.OldApplicationBuilder.New() -> Microsoft.AspNetCore.Builder.IApplicationBuilder!
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.
Fixed in commit 2805982. The HotReload APIs are now marked as REMOVED in PublicAPI.Unshipped.txt instead of being deleted from PublicAPI.Shipped.txt.
…eting Co-authored-by: maraf <10020471+maraf@users.noreply.github.com>
/ba-g |
Do not merge before dotnet/sdk#49800
This PR removes the built-in HotReload functionality from Blazor WebAssembly as requested in the issue.
Changes Made
Removed Files
src/Components/WebAssembly/WebAssembly/src/HotReload/WebAssemblyHotReload.cs
- The main HotReload implementation classsrc/Components/WebAssembly/WebAssembly/src/HotReload/
- Empty directory after file removalUpdated Files
PublicAPI.Shipped.txt - Removed 3 HotReload-related public API entries:
Microsoft.AspNetCore.Components.WebAssembly.HotReload.WebAssemblyHotReload
ApplyHotReloadDelta
methodGetApplyUpdateCapabilities
methodPublicAPI.Unshipped.txt - Removed 19 HotReload-related entries:
WebAssemblyHotReload.Delta
struct and all its propertiesWebAssemblyHotReload.LogEntry
struct and all its propertiesApplyHotReloadDeltas
methodBoot.WebAssembly.Common.ts - Removed JavaScript interop methods:
applyHotReload
(obsolete method)applyHotReloadDeltas
getApplyUpdateCapabilities
GlobalExports.ts - Removed TypeScript interface definitions for the removed methods
WebAssemblyHost.cs - Removed:
using Microsoft.AspNetCore.Components.WebAssembly.HotReload;
using System.Reflection.Metadata;
(now unused)Microsoft.AspNetCore.Components.WebAssembly.props - Removed
WebAssemblyHotReloadCapabilities
propertyImpact
This is a clean removal of the self-contained WebAssembly HotReload functionality without affecting:
Testing
Fixes #62776.
Fixes #62371.
Contributes to #61272
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.