Skip to content

Ability to explicitly add items to the cache #11

@marin-bratanov

Description

@marin-bratanov

Unless I misunderstand and misconfigure the ServiceWorkerPreCacheExcludeFiles and ServiceWorkerPreCacheExcludeReleaseFiles, we can't explicitly add things to the requiredFiles array that will be cached.

Being able to explicitly add resources can be helpful when your data comes from a some REST endpoint (e.g., a controller) and not from a static file, which I expect will be common in a real app.

EDIT: This can also be helpful for static assets used by other packages - they are not in the project folder so they won't be generated, but they need to be cached as well.

While I can edit the array myself, I must remember to edit it again after re-generating anything from the PWA infrastructure, which is error prone. I'd rather not add another js file of my own to try to add to the cache myself (this is my first touch with a PWA and I'll probably mess something up).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions