chore(share): write meta file for analysis

This commit is contained in:
Elian Doran 2026-02-21 09:57:05 +02:00
parent bbaa2db377
commit 416e11a32b
No known key found for this signature in database
2 changed files with 5 additions and 2 deletions

View File

@ -1,4 +1,5 @@
node_modules/
legacy/
dist/
.env
.env
meta.json

View File

@ -3,6 +3,7 @@ import path from "node:path";
import dotenv from "dotenv";
import * as esbuild from "esbuild";
import { writeFileSync } from "node:fs";
// const fileURL = fileURLToPath(import.meta.url);
@ -73,8 +74,9 @@ async function runBuild(watch: boolean) {
const ctx = esbuild.context(opts);
(await ctx).watch();
} else {
await esbuild.build(opts);
const result = await esbuild.build(opts);
const after = performance.now();
writeFileSync("meta.json", JSON.stringify(result.metafile, null, 2));
console.log(`Build actually took ${(after - before).toFixed(2)}ms`);
}
}