Commit d52e710
authored
fix(cycling-coach): inject createRequire into ESM bundle to fix startup crash (#295)
The published binary bundles workspace packages inline (noExternal
@enduragent/*), pulling transitive CommonJS deps (@grammyjs/auto-retry ->
debug) into the ESM bundle. Their require() of Node builtins hit esbuild's
dynamic-require shim, which threw at startup (Dynamic require of "tty" is
not supported) — crashing the container and failing the release pack-smoke.
Add a createRequire banner so the shim delegates to a real require.1 parent 6ac56b0 commit d52e710
2 files changed
Lines changed: 18 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
15 | 25 | | |
0 commit comments