Commit bd603ca
✅ 将 CloudBase 打包到 bundle 中
主要修改:
1. 修改 webpack 配置,将 @cloudbase/manager-node 添加到 allowlist
- 从 externals 排除列表中移除 /^@cloudbase\//
- 将 CloudBase 相关包添加到 allowlist 中打包
2. 修复 TypeScript 错误
- 为 storage.ts 中的 progressData 参数添加类型注解
3. 验证打包效果
- Bundle 大小从 460KB 增加到 607KB
- 模块数量从 117 个增加到 204 个
- 成功将 CloudBase 及其依赖打包到 bundle 中
- 消除了运行时的外部依赖问题
现在 MCP 可以独立运行,无需依赖外部 CloudBase 包,
应该能解决 "o.default is not a constructor" 错误。
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent cdd5054 commit bd603ca
1 file changed
Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
179 | 182 | | |
180 | 183 | | |
181 | 184 | | |
182 | 185 | | |
183 | | - | |
184 | 186 | | |
185 | 187 | | |
186 | 188 | | |
| |||
248 | 250 | | |
249 | 251 | | |
250 | 252 | | |
251 | | - | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
252 | 257 | | |
253 | 258 | | |
254 | 259 | | |
255 | | - | |
256 | 260 | | |
257 | 261 | | |
258 | 262 | | |
| |||
0 commit comments