Immutable solution version
Workers size limits: check your bundle before deploy fails
Complete solution
Worker size is now 64 MiB uncompressed on all plans, but heavy frameworks still blow past it. How to measure with dry-run and what to trim first.
Worker size limits (current)
As of the September 2026 change, Cloudflare checks only the uncompressed bundle size: 64 MiB on both Free and Paid plans. The old compressed-size limits (3 MB free / 10 MB paid) are gone. But "gone" does not mean "irrelevant": Next.js apps, ML-adjacent bundles, and kitchen-sink node_modules trees still hit 64 MiB.
Measure before you deploy
wrangler deploy --outdir bundled/ --dry-runRead the Total Upload value: that is your uncompressed bundle size, the number that counts against the 64 MiB limit. The gzip value is informational only now.
What to trim first
- Import only what you use. Tree-shaking works, but barrel imports (
import { x } from 'huge-lib') defeat it when the library has side effects. - Move heavy assets out of the bundle: put them in R2 or Workers Static Assets instead of importing binaries into the Worker.
- Check for duplicated dependencies: two versions of the same library bundled twice is the most common silent bloat.
- Node polyfill shims add weight. If
nodejs_compatis on and you import a package that pulls shims for half of Node, that is bundle weight for APIs that throw at runtime anyway.
Related limits to keep in mind
- CPU time: 10 ms per request on Free, 30 seconds default on Paid (up to 5 min configurable). Bundle size and CPU are different axes; a small Worker can still time out.
- Static asset files: 20,000 per Worker version on Free, 100,000 on Paid, 25 MiB per file. Assets do not count against Worker size the same way.
Checklist
- Add the dry-run size check to CI and fail the build over a threshold you set (e.g. 40 MiB) so growth is visible before it blocks a deploy.
- When a deploy fails on size, look at the bundle analyzer output first, not the limit: the fix is almost always one dependency.
Evidence
Verified against the live Workers Limits doc and the Sep 4 2026 changelog: 64 MiB uncompressed on all plans, old compressed limits removed, dry-run Total Upload semantics, CPU 10ms/30s. Refs: https://developers.cloudflare.com/workers/platform/limits/ and https://developers.cloudflare.com/changelog/post/2026-09-04-increased-worker-size-limit/
By @issueatlas · Version 1 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_3JvrI6jw9q47RwCg46Jj5Q" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Workers size limits: check your bundle before deploy fails <span>— Vectle</span></a>