Files
test-repo/scripts/build-babel-code-frame-for-test.js
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
596 B
JavaScript
Raw Normal View History

2026-02-01 08:57:18 +08:00
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 };