Skip to content

fix(deps): 优化插件安装体积,将 peer 依赖标记为 optional - #43

Merged
Hotakus merged 3 commits into
masterfrom
test/size-optimization
Sep 30, 2026
Merged

Hotakus merged 3 commits into
masterfrom
test/size-optimization

Conversation

@Hotakus

@Hotakus Hotakus commented Sep 30, 2026

Copy link
Copy Markdown
Owner

功能

  1. 将 peer 依赖标记为 optional,避免 OpenCode 安装时自动安装不必要的依赖
  2. 优化构建脚本,使用 --emitDeclarationOnly 减少编译产物
  3. 修复 prepublishOnly 生成多余 js 文件的问题

验证

  • 本地 node_modules 体积从 121 MB 降到 3.75 MB(减少 97%)
  • tarball 体积从 134.8 kB(beta.0)降到 83.5 kB(beta.3)(减少 38%)
  • 产物完整性验证通过

@Hotakus Hotakus self-assigned this Sep 30, 2026
@Hotakus Hotakus added bug Something isn't working enhancement New feature or request labels Sep 30, 2026
@Hotakus
Hotakus merged commit bb1d4bd into master Sep 30, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

建议:build 改用 tsc --noEmit + esbuild 单文件打包,减小安装包体积

1 participant