Commit 3cc34ea
committed
fix: bundle @slack SDK into plugin to avoid CJS/ESM interop issues
Bun's runtime cannot resolve named exports from CJS modules that use
Object.defineProperty getters (e.g. @slack/web-api's WebClient). Static
imports, namespace imports, createRequire, and dynamic import() all
fail because Bun strips getter-defined properties from the ESM namespace
object.
The only reliable solution is to avoid runtime CJS/ESM interop entirely
by bundling the @slack/* packages into the plugin with tsup. This
eliminates the dependency on Bun correctly handling CJS module namespaces.
Signed-off-by: xuezhaojun <xuezhaokeepgoing@gmail.com>1 parent 21af755 commit 3cc34ea
3 files changed
Lines changed: 8 additions & 18 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 | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
| 37 | + | |
41 | 38 | | |
42 | 39 | | |
| 40 | + | |
| 41 | + | |
43 | 42 | | |
44 | 43 | | |
45 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | 6 | | |
15 | 7 | | |
16 | 8 | | |
| |||
219 | 211 | | |
220 | 212 | | |
221 | 213 | | |
222 | | - | |
223 | 214 | | |
224 | 215 | | |
225 | 216 | | |
| |||
0 commit comments