first commit
This commit is contained in:
+23
@@ -0,0 +1,23 @@
|
||||
import * as esbuild from "esbuild";
|
||||
|
||||
const watch = process.argv.includes("--watch");
|
||||
|
||||
const ctx = await esbuild.context({
|
||||
entryPoints: ["./src/extension.ts"],
|
||||
bundle: true,
|
||||
outfile: "dist/extension.js",
|
||||
external: ["vscode"],
|
||||
format: "cjs",
|
||||
platform: "node",
|
||||
target: "es2022",
|
||||
sourcemap: true,
|
||||
logLevel: "info",
|
||||
});
|
||||
|
||||
if (watch) {
|
||||
await ctx.watch();
|
||||
console.log("Watching for changes...");
|
||||
} else {
|
||||
await ctx.rebuild();
|
||||
await ctx.dispose();
|
||||
}
|
||||
Reference in New Issue
Block a user