Commit c6c904b
fix(build): externalize @slack/web-api in build:cjs + declare as root dep (#983)
build:cjs bundles the @agent-relay/slack-primitive workspace source, which
imports @slack/web-api. esbuild had to resolve+bundle it, but it isn't installed
in every publish context -> 'Could not resolve @slack/web-api' broke build:cjs
(and the agent-relay publish). Mirror the ssh2/better-sqlite3 pattern:
externalize @slack/web-api (loaded at runtime) AND declare it as a root
agent-relay dependency (^7.16.0, matching slack-primitive) so consumers resolve
it from node_modules. Hoists it to root in the lockfile (7.15.2 -> 7.16.0).
build:cjs now passes; @slack/web-api is a runtime require() in dist/index.cjs.
Co-authored-by: Proactive Runtime Bot <agent@agent-relay.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent ec38236 commit c6c904b
3 files changed
Lines changed: 39 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| 148 | + | |
148 | 149 | | |
149 | 150 | | |
150 | 151 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
19 | 23 | | |
20 | 24 | | |
21 | 25 | | |
| |||
0 commit comments