File size: 584 Bytes
7bedc79 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | #!/usr/bin/env node
// Bundle the VS Code extension with esbuild (handles ESM core + CJS extension)
const { build } = require("esbuild");
const path = require("path");
build({
entryPoints: [path.join(__dirname, "src/extension.ts")],
bundle: true,
outfile: path.join(__dirname, "out/extension.js"),
external: ["vscode"],
format: "cjs",
platform: "node",
target: "node20",
sourcemap: true,
minify: false,
}).then(() => {
console.log("✅ Extension bundled to out/extension.js");
}).catch((err) => {
console.error("❌ Build failed:", err);
process.exit(1);
});
|