Skip to content

Blazor PWA: Add support for excluding subfolders and files from assets manifest #22472

@scottaddie

Description

@scottaddie

Is your feature request related to a problem? Please describe.

This feature request is inspired by the conversation in dotnet/AspNetCore.Docs#18630.

Here's the relevant info that I received offline from the customer (@comfycoder):

FYI, I am working on a Blazor PWA.

I use Libman to bring in JavaScript dependencies, which are automatically placed in the project's wwwroot folder.

This results in a larger-than-necessary bin/Debug/netstandard2.1/wwwroot/service-worker-assets.js file and includes many undesired entries (in the file's assets array) for the wwwroot/lib folder's files. One example of an undesired entry is:

    {
      "hash": "sha256-BHNhq10T\/9aejlrFEhS\/NYeYS3Djwv\/pqg2xUjQCx\/s=",
      "url": "lib\/bootstrap\/dist\/css\/bootstrap-grid.css"
    },

I understand there is no easy solution right now.

But, preventing this behavior through exclusion (preferred) or removal of the lib folder would be nice to have.

/cc: @SteveSandersonMS @danroth27

Metadata

Metadata

Assignees

No one assigned

    Labels

    affected-fewThis issue impacts only small number of customersarea-blazorIncludes: Blazor, Razor ComponentsenhancementThis issue represents an ask for new feature or an enhancement to an existing onefeature-pwaIssues related to building PWAs with Blazorfeature-static-web-assetsseverity-majorThis label is used by an internal tool

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions