Skip to content

WithStaticAssets Is not working with MVC But does with Razor Pages #62158

Open
@CodAffection

Description

@CodAffection

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

WithStaticAssets Is not working with MVC But does with Razor Pages, What I meant by that in Razer Page Views, static files are not using fingerprinted url but now with MVC Views.

app.MapRazorPages()
  .WithStaticAssets();

app.MapControllerRoute(
    name: "default",
    pattern: "{controller=Article}/{action=Index}/{id?}")
    .WithStaticAssets();

Am I doing something wrong, and for razor pages it didn't event importmap script tag
<script type="importmap"></script>

Thanks in advance.

Expected Behavior

No response

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

    area-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templates

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions