| 1 |
const cache = require("./cache"); |
| 2 |
|
| 3 |
function initialize(babel) { |
| 4 |
exports.init = null; |
| 5 |
exports.version = babel.version; |
| 6 |
exports.DEFAULT_EXTENSIONS = babel.DEFAULT_EXTENSIONS; |
| 7 |
exports.loadOptionsAsync = babel.loadOptionsAsync; |
| 8 |
exports.transformAsync = babel.transformAsync; |
| 9 |
exports.getEnv = babel.getEnv; |
| 10 |
|
| 11 |
if (!process.env.BABEL_8_BREAKING) { |
| 12 |
exports.OptionManager = babel.OptionManager; |
| 13 |
exports.transformSync = babel.transformSync; |
| 14 |
} |
| 15 |
|
| 16 |
cache.initializeCacheFilename(); |
| 17 |
} |
| 18 |
|
| 19 |
if (USE_ESM) { |
| 20 |
|
| 21 |
exports.init = import("@babel/core").then(initialize); |
| 22 |
} else { |
| 23 |
initialize(require("@babel/core")); |
| 24 |
} |