Fix(babel-preset-env): check api.caller is a function to avoid… (#10649)
This commit is contained in:
parent
5f2240e7ab
commit
f8eb290da1
@ -237,7 +237,7 @@ export default declare((api, opts) => {
|
||||
modules !== "auto" || !api.caller || !api.caller(supportsStaticESM),
|
||||
shouldTransformDynamicImport:
|
||||
modules !== "auto" || !api.caller || !api.caller(supportsDynamicImport),
|
||||
shouldParseTopLevelAwait: api.caller(supportsTopLevelAwait),
|
||||
shouldParseTopLevelAwait: !api.caller || api.caller(supportsTopLevelAwait),
|
||||
});
|
||||
|
||||
const pluginNames = filterItems(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user