Skip to content

Commit

Permalink
fix: search for browserslist if esmodules is falsy (#11124)
Browse files Browse the repository at this point in the history
* fix: search for browserslist if esmodules is falsy

closes #11123

* fix: delete falsy targets.esmodules

* style: fix code style

* fix: remove esmodules after being consumed
  • Loading branch information
fengzilong committed Feb 24, 2020
1 parent a192c0f commit 2d1bac9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/babel-helper-compilation-targets/src/index.js
Expand Up @@ -186,6 +186,9 @@ export default function getTargets(
.join(", ");
}

// Remove esmodules after being consumed to fix `hasTargets` below
delete targets.esmodules;

// Parse browsers target via browserslist
const browsersquery = validateBrowsers(targets.browsers);

Expand Down

0 comments on commit 2d1bac9

Please sign in to comment.