Cloudflare DevelopersCD
Cloudflare Developers10mo ago
60 replies
orangeboi

25MiB bundle size limit with CF Pages

Previously my Remix Vite app had a server bundle size of 1.7MiB and a client bundle size of 19MiB.

I discovered that a dependency of @blocknote/core drastically increased the size by 12MiB, so I marked it as build.rollupOptions.external in my vite.config.ts, then am loading the scripts in my React component.

However despite doing this I'm still getting the same error in Pages:
Generated Pages Functions bundle size (26348753) is over the limit of 25.0 MiB

Previously: 21MiB (1.7MiB server bundle, 19MiB client bundle)
Currently: 9MiB (1.7MiB server bundle, 7MiB client bundle)
Was this page helpful?