| Sep | OCT | Nov |
| 23 | ||
| 2019 | 2020 | 2021 |
COLLECTED BY
Collection: github.com
|
Fixes angular/angular#31256. When differential loading is used, by default the Angular Service Worker will double-(pre)fetch the ES5 & ES2015 bundles, unless those are explicitly excluded as per angular/angular#31256 (comment).
Excluding those ES5 bundles from the
Doing so would prevent browsers with Service Worker support but without In addition:
|
|
This is definitely a step in the right direction.
It would be even better imo if we could adapt the |
| @@ -11,7 +11,8 @@ | |||
| "/index.html", | |||
| "/manifest.webmanifest", | |||
| "/*.css", | |||
| "/*.js" | |||
| "/*.js", | |||
| "!/*-es5*.js" | |||
/*-es5*.js bundles (as shown in angular/angular#31256 (comment)).
There is no overhead for es2015 supporting browsers.
target specified in the tsconfig, but also the result of the browserslists query.
@gkalpak, what would we the value to generate a different ngsw-config.json?
es2015 in the bundle names is more future proof I think there is some value in introducing that logic now & doing a migration when v11 lands, especially as double (pre)fetching by the Angular Service Worker can be hard to detect when not looking for it.
Having said that I'll likely won't be the one writing the v11 migration code so I completely understand if you want to postpone that for now, and I'll try not to forget to update my ngsw-config.json for v11 :).
Author
One downside of doing so is that in my case I enabled the Angular Service Worker (and applied the
Also I believe that the Angular CLI is now setting the target to |
fix(@schematics/angular): exclude es5 bundles from being prefetch whe…
Loading status checks…
6fef6de
…n differencial loading is used
6b6b4b4to6fef6de
Requested changes must be addressed to merge this pull request.
No one assigned Labels cla: yes No milestoneSuccessfully merging this pull request may close these issues.
4 participants Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. ●© 2020 GitHub, Inc. ●Terms ●Privacy ● ●Security ●Status ●Help ●Contact GitHub ●Pricing ●API ●Training ●Blog ●About You can’t perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.