Files
test-repo/scripts/build-babel-code-frame-for-test.js
T
88ee8a5b3e Update babel to v8.0.0-rc.1 (#18822)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: fisker Cheung <lionkay@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-02-01 08:57:18 +08:00

25 lines
596 B
JavaScript

import url from "node:url";
import esbuild from "esbuild";
import {
PRODUCTION_MINIMAL_NODE_JS_VERSION,
PROJECT_ROOT,
} from "./utilities/index.js";
const file = url.fileURLToPath(
new URL("../vendors/babel-code-frame-for-test.js", import.meta.url),
);
async function buildBabelCodeFrameForTest() {
await esbuild.build({
entryPoints: ["@babel/code-frame"],
bundle: true,
target: [`node${PRODUCTION_MINIMAL_NODE_JS_VERSION}`],
format: "esm",
outfile: file,
mainFields: ["browser"],
absWorkingDir: PROJECT_ROOT,
});
}
export { buildBabelCodeFrameForTest };