Babel transforms for the ijavascript kernel (typescript, top-level await, esm import).
- esmcjs - transforms esm imports to require
- topLevelAwait - transforms top-level await to async iife
import { esmcjs, topLevelAwait } from './lib/index.js'
const result = await babel.transform(code, {
plugins: [esmcjs, topLevelAwait],
})
console.log(result.code)