workers.api.error.script_too_large [code: 10027] using Nuxt 3

Total Upload: 9181.72 KiB / gzip: 1817.09 KiB ▲ [WARNING] We recommend keeping your script less than 1MiB (1024 KiB) after gzip. Exceeding this can affect cold start time. Consider using Wrangler's --minify option to reduce your bundle size. Any way to get around this?
1 Reply
DaniFoldi
DaniFoldi13mo ago
Over 9 MB sounds like some huge import, or lots of wasm binaries end up in your server bundle. On the paid plan, workers can now be up to 10MB in size, however there is a cold start on >1MB workers. You can use a bundle analyzer to see what's causing your server bundle to become so large. (gzipped is what actually matters, so your worker is technically 1.8MiB in storage. Also the --minify option is unlikely to help with nuxt projects too much since nuxt already minifies output bundles iirc)
Want results from more Discord servers?
Add your server