DL fixes for safari and false negatives for ES6 module support #14716
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.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fix(@angular-devkit/build-angular): nomodule polyfill for Safari 10.1 and iOS Safari 10.3
The nomodule polyfill needs to be inject prior to any script and be
outside of webpack compilation because otherwise webpack will cause the
script to be wrapped in
window["webpackJsonp"]
which causes this tofail.
Also, this ensures that it's loaded and executed prior to any other
nomodule script.
This polyfill will only be injected when the either Safari 10.1 or iOS
Safari 10.3 support is required, which is based on the browsers defined in browserslist file.
Fixes #14680
fix(@angular-devkit/build-angular): browsers that partially support es6 modules are being marked as not supported
caniuse-api
only returnstrue
for a feature when it's fully supported. This might causes redundant ES5 builds if users opt to support only browsers which do support ES6 modules but either require polyfills such as Safari 10.1 or when both bundles will be downloaded such asEdge 18
See: https://github.com/Nyalab/caniuse-api/blob/1b74c10257e36877709da4f6630513db10203a78/src/index.js#L49 and Nyalab/caniuse-api#82
Fixes #14580