perf(cli): use compile cache (~10% faster)

This commit is contained in:
Pooya Parsa
2026-01-27 16:00:25 +01:00
committed by vignesh07
parent 9b16a6be3d
commit a0698e0403
2 changed files with 17 additions and 2 deletions

14
moltbot.mjs Executable file
View File

@@ -0,0 +1,14 @@
#!/usr/bin/env node
import module from "node:module";
// https://nodejs.org/api/module.html#module-compile-cache
if (module.enableCompileCache && !process.env.NODE_DISABLE_COMPILE_CACHE) {
try {
module.enableCompileCache();
} catch {
// Ignore errors
}
}
await import("../dist/entry.js");