Asset Caching

The cache is populated with all assets managed by Asset Mapper. By default, it includes all types of well recognized assets such as images, stylesheets or scripts:

/\.(css|js|json|xml|txt|map|ico|png|jpe?g|gif|svg|webp|bmp)$/

This can be changed using the next configuration options:

/config/packages/pwa.yaml
pwa:
    serviceworker:
        enabled: true
        src: "sw.js"
        workbox:
            asset_cache:
                enabled: true
                regex: '/\.(css|jsx?)$/'

Last updated

Was this helpful?