Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cloudflare Worker size limit #233

Open
techniq opened this issue Aug 17, 2024 · 0 comments
Open

Cloudflare Worker size limit #233

techniq opened this issue Aug 17, 2024 · 0 comments

Comments

@techniq
Copy link
Owner

techniq commented Aug 17, 2024

Keep hitting the 1 MB worker limit (gzip size)

Failed to publish your Function. Got error: Your Worker exceeded the size limit of 1 MiB. Refer to the Workers documentation (https://developers.cloudflare.com/workers/observability/errors/#errors-on-worker-upload) for more details.

I've had success shrinking the build by moving all the data to /static and loading at run time via load() (example) as well as loading the CHANGELOG.md from raw Github, but I'm running out out easy wins.

I need to analyze the bundle to see if there are anymore easy wins (maybe switching from Prism.js to Shiki).

The Workers Paid plan allows workers to be 1MB in size, so paying $5/month might be worth it instead of continuing to encounter the issue

See also the Svelte Kit docs (for workers although using Pages which leverages workers and getting same error). Not sure what would make sense to load server-side only though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant