Esbuild & Mentions: Updated interaction stability and build system

- Updated esbuild system to be module, and fixed build command.
- Reverted module use in package.json by default as this impacted test
  runs/files.
- Updated mention user select:
  - To look better in dark mode.
  - To not remove text after on select.
  - To properly revert/restore focus on enter or cancel.
This commit is contained in:
Dan Brown
2025-12-17 21:11:01 +00:00
parent 3d9aba7b1f
commit 90fc02c57f
7 changed files with 38 additions and 13 deletions

View File

@@ -5,7 +5,6 @@ import * as path from 'node:path';
import * as fs from 'node:fs';
import * as process from "node:process";
// Check if we're building for production
// (Set via passing `production` as first argument)
const mode = process.argv[2];
@@ -76,7 +75,13 @@ if (mode === 'watch') {
});
} else {
// Build with meta output for analysis
ctx.rebuild().then(result => {
fs.writeFileSync('esbuild-meta.json', JSON.stringify(result.metafile));
}).catch(() => process.exit(1));
const result = await ctx.rebuild();
const outputs = result.metafile.outputs;
const files = Object.keys(outputs);
for (const file of files) {
const output = outputs[file];
console.log(`Written: ${file} @ ${Math.round(output.bytes / 1000)}kB`);
}
fs.writeFileSync('esbuild-meta.json', JSON.stringify(result.metafile));
process.exit(0);
}