mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 21:34:32 +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"
|
"./cli-entry": "./dist/entry.js"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"moltbot": "dist/entry.js",
|
"moltbot": "./moltbot.mjs",
|
||||||
"clawdbot": "dist/entry.js"
|
"clawdbot": "./moltbot.mjs"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"dist/acp/**",
|
"dist/acp/**",
|
||||||
@@ -56,6 +56,7 @@
|
|||||||
"docs/**",
|
"docs/**",
|
||||||
"extensions/**",
|
"extensions/**",
|
||||||
"assets/**",
|
"assets/**",
|
||||||
|
"moltbot.mjs",
|
||||||
"skills/**",
|
"skills/**",
|
||||||
"patches/**",
|
"patches/**",
|
||||||
"README.md",
|
"README.md",
|
||||||
|
|||||||
Reference in New Issue
Block a user