Skip to content

Yarp need to be configured explicitly for @react-refresh #63258

@andrew-vdb

Description

@andrew-vdb

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I have following situations

Blazor Page
@page "/xxx/{catchAll?}"

Yarp

"Match": {
  "Path": "/xxx/{**catch-all}"
}

In the old blazor template, it work perfectly

app.UseHttpsRedirection();

app.UseStaticFiles();

app.MapReverseProxy();

app.UseRouting();

app.MapBlazorHub();
app.MapFallbackToPage("/_Host");

In the new blazor template,

app.MapStaticAssets();
app.MapRazorComponents<App>()
    .AddInteractiveServerRenderMode()
    .AddInteractiveWebAssemblyRenderMode()
    .AddAdditionalAssemblies(typeof(WebApp.Client._Imports).Assembly);

I have to explicitly map '@react-refresh'

"Match": {
  "Path": "/xxx/@react-refresh"
}

If i dont do that, '@react-refresh' is not proxied and the request returning blazor page
The rest of the request is proxied correctly, only that request somehow went to blazor page
This only happen in new blazor template (web app)

Expected Behavior

It should work without explicit mapping to react-refresh

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: Author FeedbackThe author of this issue needs to respond in order for us to continue investigating this issue.Needs: ReproIndicates that the team needs a repro project to continue the investigation on this issueStatus: No Recent Activityarea-blazorIncludes: Blazor, Razor Components

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions