Skip to content

Commit

Permalink
Uses require instead of default import when transpiling polyfill.
Browse files Browse the repository at this point in the history
  • Loading branch information
debugpai committed Mar 2, 2018
1 parent fdfbd9a commit 58ed5fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/babel-preset-env/src/use-built-ins-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default function({ types: t }: { types: Object }): Plugin {
if (builtIn && !builtIns.has(builtIn)) {
builtIns.add(builtIn);
const programPath = path.find(path => path.isProgram());
programPath.unshiftContainer("body", createImport(t, builtIn));
programPath.unshiftContainer("body", createImport(t, builtIn), "require");
}
}

Expand Down

0 comments on commit 58ed5fb

Please sign in to comment.