Skip to content

Commit

Permalink
chore: add comment about async imports in babel (#23374)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxschmitt committed May 31, 2023
1 parent 2582d39 commit 4eeb465
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ function babelTransformOptions(isTypeScript: boolean, isModule: boolean, plugins

if (!isModule) {
plugins.push([require('@babel/plugin-transform-modules-commonjs')]);
// This converts async imports to require() calls so that we can intercept them with pirates.
plugins.push([require('@babel/plugin-proposal-dynamic-import')]);
} else {
plugins.push([require('@babel/plugin-syntax-import-assertions')]);
Expand Down

0 comments on commit 4eeb465

Please sign in to comment.