MCPcopy Create free account
hub / github.com/continuedev/continue / buildWithEsbuild

Function buildWithEsbuild

binary/build.js:49–78  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

47
48// Bundles the extension into one file
49async function buildWithEsbuild() {
50 console.log("[info] Building with esbuild...");
51 await esbuild.build({
52 entryPoints: ["src/index.ts"],
53 bundle: true,
54 outfile: esbuildOutputFile,
55 external: [
56 "esbuild",
57 "./xhr-sync-worker.js",
58 "llamaTokenizerWorkerPool.mjs",
59 "tiktokenWorkerPool.mjs",
60 "vscode",
61 "./index.node",
62 ],
63 format: "cjs",
64 platform: "node",
65 sourcemap: true,
66 minify: !esbuildOnly,
67 treeShaking: true,
68 loader: {
69 // eslint-disable-next-line @typescript-eslint/naming-convention
70 ".node": "file",
71 },
72
73 // To allow import.meta.path for transformers.js
74 // https://github.com/evanw/esbuild/issues/1492#issuecomment-893144483
75 inject: ["./importMetaUrl.js"],
76 define: { "import.meta.url": "importMetaUrl" },
77 });
78}
79
80(async () => {
81 if (esbuildOnly) {

Callers 1

build.jsFile · 0.85

Calls 1

logMethod · 0.65

Tested by

no test coverage detected