Skip to content

Commit

Permalink
Merge pull request #11754 from webpack/bugfix/11753
Browse files Browse the repository at this point in the history
caniuse es6 doesn't report arrow-functions correctly
  • Loading branch information
sokra committed Oct 20, 2020
2 parents 51cd3c7 + e000017 commit fb21e54
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/config/browserslistTargetHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,13 @@ const resolve = browsers => {
const browserProperty = !anyBrowser ? false : anyNode ? null : true;
const nodeProperty = !anyNode ? false : anyBrowser ? null : true;
const es6 = browserslistChecker("es6");
const letConst = browserslistChecker("let");
const arrowFunctions = browserslistChecker("arrow-functions");
const es6DynamicImport = browserslistChecker("es6-module-dynamic-import");
const node6 = nodeChecker(6);
return {
const: es6 && node6,
arrowFunction: es6 && node6,
const: letConst && node6,
arrowFunction: arrowFunctions && node6,
forOf: es6 && nodeChecker(5),
destructuring: es6 && node6,
bigIntLiteral: browserslistChecker("bigint") && nodeChecker(10, 4),
Expand Down

0 comments on commit fb21e54

Please sign in to comment.