mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-15 12:55:51 +00:00
将 `import hljs from 'highlight.js'`(190+ 语言,~5-15MB)改为 `import hljs from 'highlight.js/lib/core'` + 静态导入并注册 26 个 常用语言(TypeScript、Python、Bash、Go、Rust 等)。静态 import 在 Bun --compile 模式下正常工作,避免了 createRequire 的路径问题。 内存从 ~5-15MB 降至 ~1-2MB。添加 7 个测试验证语言注册和 highlight 功能,现有 17 个 color-diff 测试全部通过。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>