Commit 5cb550b
committed
fix: add Node.js polyfills for webpack UMD build
Resolves webpack 5 build errors by adding polyfills for Node.js core
modules that are no longer included by default. This fixes the GitHub
workflow failure where the UMD build was failing with 'stream' module
resolution errors.
Changes:
- Added webpack resolve.fallback configuration for Node.js modules
- Installed stream-browserify, buffer, util, and url polyfill packages
- Added ESLint directives for webpack.config.js CommonJS usage
- UMD build now compiles successfully for browser environments
Fixes the error:
"Module not found: Error: Can't resolve 'stream' in helpers.ts"
The stream module import is needed for Node.js Readable stream detection
in helpers.ts but requires polyfills for browser compatibility.1 parent bdfa175 commit 5cb550b
3 files changed
Lines changed: 120 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
| |||
90 | 91 | | |
91 | 92 | | |
92 | 93 | | |
| 94 | + | |
93 | 95 | | |
94 | 96 | | |
95 | 97 | | |
96 | 98 | | |
97 | 99 | | |
| 100 | + | |
| 101 | + | |
98 | 102 | | |
99 | 103 | | |
100 | 104 | | |
| |||
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 | + | |
| 2 | + | |
| 3 | + | |
1 | 4 | | |
2 | 5 | | |
3 | 6 | | |
| |||
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
26 | 35 | | |
27 | 36 | | |
0 commit comments