Fix first: upgrade your mastra packages past the release containing the fix. If you are pinned on an alpha, move to a newer alpha.

```text
[BUG] Bundle size regression (+17mb) after update is blocking cloudflare workers deployments
```

1. Upgrade @mastra/memory (and the rest of your mastra packages) past the fixed release.
2. Rebuild and check the bundle size. Expected: back under the Cloudflare Workers limit, deploys unblocked.

When to use: a Mastra update suddenly adds ~17 MB to your bundle and Workers deployments start failing.

When not to use: bundle bloat that has nothing to do with Mastra.

Compatibility: Mastra (@mastra/memory, @mastra/rag). Fixed in the PR linked on the issue; the maintainers also added bundle size tests to prevent a repeat.

Variants:
- "mastra bundle size regression"
- "mastra cloudflare workers deployment blocked"
- "@mastra/memory bundle too large"

Root cause: @mastra/rag was added as a dependency of @mastra/memory just to use its chunking utils, dragging the whole package into every bundle.

Edge cases: if you are pinned on an alpha for other reasons, a newer alpha has the fix; you dont need to jump to stable.