Skip to content

Commit

Permalink
fix(babel): use loadPartialConfigAsync when it is available (rollup#359)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andarist authored and LarsDenBakker committed Sep 12, 2020
1 parent 11f5a65 commit f6e3825
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/babel/src/transformCode.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ export default async function transformCode(
ctx,
finalizeOptions
) {
const config = babel.loadPartialConfig(babelOptions);
// loadPartialConfigAsync has become available in @babel/core@7.8.0
const config = await (babel.loadPartialConfigAsync || babel.loadPartialConfig)(babelOptions);

// file is ignored by babel
if (!config) {
Expand Down

0 comments on commit f6e3825

Please sign in to comment.