Skip to content

Add support for hot reload to hosted BlazorWasm apps #16701

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
merged 1 commit into from
Apr 2, 2021

Conversation

pranavkm
Copy link
Contributor

@pranavkm pranavkm commented Apr 1, 2021

  • Fix a bug where deltas where being sent in the wrong format to BlazorWASM
  • Allow recovering from compilation errors in a BlazorWASM app.

Fixes dotnet/aspnetcore#30815

* Fix a bug where deltas where being sent in the wrong format to BlazorWASM
* Allow recovering from compilation errors in a BlazorWASM app.

Fixes dotnet/aspnetcore#30815
_wasmApplier = new BlazorWebAssemblyDeltaApplier(reporter);
_hostApplier = new AspNetCoreDeltaApplier(reporter)
{
SuppressBrowserRefreshAfterApply = true,
Copy link
Member

Choose a reason for hiding this comment

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

This flag is saying that if an update was made to the host then browser doesn't need to refresh because unlike other AspNetCore scenarios the app being served in the browser is not running in the host but in the Blazor WASM side.

Is my understanding of that correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

By default AspNetCoreDeltaApplier will attempt to either re-render components or refresh the browser after a delta has been applied. Since the WebAssembly one takes care of re-rendering, we kinda want this to no-op.

@pranavkm
Copy link
Contributor Author

pranavkm commented Apr 2, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dotnet-watch: Figure out hot reload for a blazor hosted app
3 participants