Commit 12294b6
claude: Fix bundler async cycles by making CRI client import dynamic
Breaks the async propagation chain from hash.ts by converting the static
import of withCriClient to a dynamic import. This prevents esbuild from
marking core/handlers/base.ts as async, which was causing it to propagate
async to 14 cyclic files, generating invalid bundle code.
The ILP optimizer identified this single import as the optimal break point
affecting all 14 async propagation chains.
Changes:
- Remove static import of withCriClient from core/cri/cri.ts
- Add getCriClient() helper function with dynamic import
- Update extractHtml() to use getCriClient()
- Update createPngsFromHtml() to use getCriClient()
Result: Bundle builds successfully with no async cycle errors.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 3a81483 commit 12294b6
1 file changed
+8
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
82 | 81 | | |
83 | 82 | | |
84 | 83 | | |
| |||
89 | 88 | | |
90 | 89 | | |
91 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
92 | 97 | | |
93 | 98 | | |
94 | 99 | | |
| |||
143 | 148 | | |
144 | 149 | | |
145 | 150 | | |
| 151 | + | |
146 | 152 | | |
147 | 153 | | |
148 | 154 | | |
| |||
177 | 183 | | |
178 | 184 | | |
179 | 185 | | |
| 186 | + | |
180 | 187 | | |
181 | 188 | | |
182 | 189 | | |
| |||
0 commit comments