Skip to content

Cloudflare Worker size limit #233

@techniq

Description

@techniq

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions