Commit 7c78549
committed
fix(parser): make fs import conditional for browser compatibility
- Use conditional require('fs') with try/catch for browser environments
- @include directive works in Node.js/Bun (CLI) but gracefully fails in browser
- Fix CI Puppeteer installation to use 'pnpm exec' instead of 'npx'
- Ensures parser works in both server and browser environments
Fixes website deployment failure (Module not found: Can't resolve 'fs')
Maintains full CLI functionality for all NPM users1 parent 6f174a0 commit 7c78549
2 files changed
+22
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
221 | | - | |
222 | | - | |
223 | | - | |
| 221 | + | |
224 | 222 | | |
225 | 223 | | |
226 | 224 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
7 | 17 | | |
8 | 18 | | |
9 | 19 | | |
| |||
155 | 165 | | |
156 | 166 | | |
157 | 167 | | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
158 | 177 | | |
159 | 178 | | |
160 | 179 | | |
| |||
0 commit comments