Commit cf1b8aa
optimize: fix JS heap memory errors and reduce bundle size
**Memory Fixes:**
- Increased Node.js heap size to 8GB for Netlify builds
- Added NODE_OPTIONS='--max-old-space-size=8192' to build command
**Dependency Optimization:**
- Pinned all "latest" dependencies to specific versions to prevent conflicts
- Fixed 6 duplicate versions of 'ox' library causing massive bloat
- @dynamic-labs/ethereum: latest -> 4.32.0
- viem: latest -> 2.37.6
- wagmi: latest -> 2.17.0
**Bundle Splitting:**
- Added manual chunk splitting in Vite config:
- vendor.js (141KB) - React core
- wallet.js (4.4MB) - Wallet/crypto libs
- ui.js (259KB) - MUI components
- main.js (1MB) - App code
- Reduced main bundle from 5.8MB to 1MB
**Build Performance:**
- Maintained 22s build time locally
- Should prevent "heap out of memory" errors on Netlify
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent bc92e44 commit cf1b8aa
3 files changed
Lines changed: 16 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
92 | 101 | | |
93 | 102 | | |
94 | 103 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
0 commit comments