Skip to content

Commit

Permalink
Pass version to presetEnv
Browse files Browse the repository at this point in the history
This change in babel babel/babel#12934 breaks Parcel if version doesn't pass into presetEnv(). By setting version as 7.13.0 presetEnv() will continue other checking, just like the logic before.
  • Loading branch information
bemnlam committed Mar 2, 2021
1 parent 806cc65 commit c322dc1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/transformers/babel/src/env.js
Expand Up @@ -48,7 +48,7 @@ export default async function getEnvOptions(

function getNeededPlugins(targets: BabelTargets): Array<PresetEnvPlugin> {
return presetEnv(
{assertVersion: () => true},
{version: '7.13.0', assertVersion: () => true}, // version is required since https://github.com/babel/babel/pull/12934/
{targets: targets},
).plugins.filter(p => p[0]);
}
Expand Down

0 comments on commit c322dc1

Please sign in to comment.