Files
babel/packages/babel-core/test/fixtures/babel-load-options-async.mjs
Nicolò RibaudoandGitHub d63035ce2d Fix import { types } from "@babel/core" with native ESM (#14663)
* Fix `import { types } from "@babel/core"` with native ESM

* Avoid default `@babel/core` import in tests (not available in ESM)
2022-06-19 00:39:31 +02:00

14 lines
284 B
JavaScript
Executable File

#!/usr/bin/env node
// Usage:
// babel-load-options-async.js [filename]
import { loadOptionsAsync } from "../../lib/index.js";
const [, , filename, cwd] = process.argv;
(async () => {
process.stdout.write(
JSON.stringify(await loadOptionsAsync({ filename, cwd }))
);
})();