Skip to content

Angular 8 Service Worker Support for Conditionally Download ES5 or Es2015 bundles #31256

@naveedahmed1

Description

@naveedahmed1

This feature request is for @angular/pwa

Description

With Angular 8 we now have support for Differential Loading, and Angular compiler produces two bundles one for ES5 and other for ES2015 and browser can choose between modern or legacy JavaScript based on its own capabilities.

This works fine, unless we are using Angular Service worker, but when we have a progressive web app, Angular Service Worker prefetchs, all JavaScript bundles i.e. ES5 and ES2015 bundles.

So, there should be an option in service worker to download the bundles on the basis of browser capabilities and it should download either ES5 or Es2015 bundles not both.

Describe the solution you'd like

May be some option could be provided in ngsw-config.json file e.g. a property for assetGroups through which we could specify when assets in this group should be downloaded (legacy/modern browser).

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: service-workerIssues related to the @angular/service-worker packageeffort2: daysfeatureIssue that requests a new featurefeature: under considerationFeature request for which voting has completed and the request is now under consideration

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions