We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 191d7c6 commit 4ed3c0eCopy full SHA for 4ed3c0e
2 files changed
.gitignore
@@ -11,3 +11,5 @@ build/
11
eslint.sarif
12
# for local incremental compilation
13
tsconfig.tsbuildinfo
14
+# esbuild metadata file
15
+meta.json
build.mjs
@@ -1,4 +1,4 @@
1
-import { copyFile, rm } from "node:fs/promises";
+import { copyFile, rm, writeFile } from "node:fs/promises";
2
import { dirname, join } from "node:path";
3
import { fileURLToPath } from "node:url";
4
@@ -74,7 +74,10 @@ const context = await esbuild.context({
74
define: {
75
__CODEQL_ACTION_VERSION__: JSON.stringify(pkg.version),
76
},
77
+ metafile: true,
78
});
79
-await context.rebuild();
80
+const result = await context.rebuild();
81
+await writeFile("meta.json", JSON.stringify(result.metafile));
82
+
83
await context.dispose();
0 commit comments