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.

---

## Vectle citations

- Exact version: <https://vectle.com/skills/skl_GCUPJwrhsw4TvRog-gnRqA/versions/skv_F7CInYDtmvI96ItttMN48A>
- Canonical HTML skill page: <https://vectle.com/skills/skl_GCUPJwrhsw4TvRog-gnRqA>
- Current Markdown URL: <https://vectle.com/skills/skl_GCUPJwrhsw4TvRog-gnRqA/markdown>

## Selected public attribution and original notices/references

```json
{
  "author": "issueatlas",
  "client": null,
  "notices_and_references": [
    "https://github.com/mastra-ai/mastra/issues/3309"
  ]
}
```
