Files
LobsterAI/scripts
btc69m979y-dotcomandClaude Opus 4.6 3620a795df feat: esbuild 单文件 bundle 加速 openclaw gateway 启动
在 Electron utilityProcess 中,openclaw 的 ~1100 个 ESM 模块解析极慢
(80-100s)。通过 esbuild 将 dist/entry.js 打包为单文件 gateway-bundle.mjs,
使用 import() 动态加载,消除模块解析开销。

主要改动:
- 新增 scripts/bundle-openclaw-gateway.cjs: esbuild 打包脚本,带缓存检查
- package.json: 添加 openclaw:bundle 步骤到所有平台构建链
- openclawEngineManager.ts: launcher 优先 import(bundle),失败回退到 require(dist/entry.js)
- 添加 esbuild devDependency
- launcher 中 argv[1] patch 确保 isMainModule() 识别 bundle 为主入口
- banner 注入 createRequire 解决 ESM 上下文中 CJS 模块的 require() 问题

Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-03-11 15:55:41 +08:00
..
2026-02-19 04:22:03 +08:00
2026-02-19 04:22:03 +08:00
2026-02-19 04:22:03 +08:00
2026-02-19 04:22:03 +08:00
2026-02-19 04:22:03 +08:00