mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
perf(cli): use compile cache (~10% faster)
This commit is contained in:
14
moltbot.mjs
Executable file
14
moltbot.mjs
Executable 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");
|
||||
@@ -11,8 +11,8 @@
|
||||
"./cli-entry": "./dist/entry.js"
|
||||
},
|
||||
"bin": {
|
||||
"moltbot": "dist/entry.js",
|
||||
"clawdbot": "dist/entry.js"
|
||||
"moltbot": "./moltbot.mjs",
|
||||
"clawdbot": "./moltbot.mjs"
|
||||
},
|
||||
"files": [
|
||||
"dist/acp/**",
|
||||
@@ -56,6 +56,7 @@
|
||||
"docs/**",
|
||||
"extensions/**",
|
||||
"assets/**",
|
||||
"moltbot.mjs",
|
||||
"skills/**",
|
||||
"patches/**",
|
||||
"README.md",
|
||||
|
||||
Reference in New Issue
Block a user