$
This commit is contained in:
29
node_modules/@babel/core/cjs-proxy.cjs
generated
vendored
Normal file
29
node_modules/@babel/core/cjs-proxy.cjs
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
"use strict";
|
||||
|
||||
const babelP = import("./lib/index.js");
|
||||
|
||||
const functionNames = [
|
||||
"createConfigItem",
|
||||
"loadPartialConfig",
|
||||
"loadOptions",
|
||||
"transform",
|
||||
"transformFile",
|
||||
"transformFromAst",
|
||||
"parse",
|
||||
];
|
||||
|
||||
for (const name of functionNames) {
|
||||
exports[`${name}Sync`] = function () {
|
||||
throw new Error(
|
||||
`"${name}Sync" is not supported when loading @babel/core using require()`
|
||||
);
|
||||
};
|
||||
exports[name] = function (...args) {
|
||||
babelP.then(babel => {
|
||||
babel[name](...args);
|
||||
});
|
||||
};
|
||||
exports[`${name}Async`] = function (...args) {
|
||||
return babelP.then(babel => babel[`${name}Async`](...args));
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user