Make the version strategy of caniuse-lite incremental #16790
Labels
area: @angular-devkit/build-angular
freq2: medium
needs: investigation
Requires some digging to determine if action is needed
severity3: broken
type: bug/fix
Milestone
Uh oh!
There was an error while loading. Please reload this page.
🚀 Feature request
Command (mark with an
x
)Description
I manage so that browserslist doesn't have
isEs5SupportNeeded
to trun off differential loading. But the result is not stable.caniuse-lite
has its own data in json file in npm package. Bothbuild-angular
andbrowserslist
havecaniuse-lite
.Since dependencies of
browserslist
is incremental likecaniuse-lite "^1.0.30001017"
andcaniuse-lite
ofbuild-angular
is fixed, the judgment result ofBuildBrowserFeatures
can change even if the source code of the repository is the same.Modern browsers are updated frequently, so Angular-cli may not be updated in time.
For example:
[email protected] includes "caniuse-lite": "1.0.30001019".
This version don't have the information of android chrome 79.
last 2 versions
on thebrowserslist
can return 79-78.BuildBrowserFeatures.isFeatureSupported('es6-module') returns false, because featureStatus for android chrome 79 is undefined.
Describe the solution you'd like
The package.json of
@angular-devkit/build-angular
changes version dependencies ofcaniuse-lite
incrementally like "^1.0.0".Describe alternatives you've considered
Make the
caniuse-lite
included in the browserlist exactly match thecaniuse-lite
of the build-angular.caniuse-lite
in resolutions.caniuse-lite
in package.json, use dependiecies of package.json in browserlist.Or, change the logic of
BuildBrowserFeatures.isFeatureSupported
.It may be better to find the lowest supported version and judge the version with an inequality sign. If using
caniuse-api
, it can be easily. But impact on polyfill creation, etc. cannot be fully determined.The text was updated successfully, but these errors were encountered: