withastro / adapters

Home for Astro's core maintained adapters
64 stars 33 forks source link

Cloudflare Deployment fails, huge worker.js file with large base64 WASM file #167

Closed mariusbolik closed 7 months ago

mariusbolik commented 7 months ago

Astro Info

Astro                    v4.3.7
Node                     v20.11.0
System                   macOS (arm64)
Package Manager          bun
Output                   server
Adapter                  @astrojs/cloudflare
Integrations             none

Describe the Bug

Hello,

I wanted to deploy my Astro Project to Cloudflare Pages, but I got the following error: Your Functions script is over the 1 MiB size limit

I checked my _worker.js File and saw that it has a file size of over 10MB.

Inside the file I noticed a huge base64 string which seems to be a Web Assembly File. Like 95% of the worker file is the Base64 String.

This is the worker file: _worker.js.txt

Kind regards, Marius

What's the expected result?

Worker with file size under 1 mb.

Link to Minimal Reproducible Example

https://github.com/mariusbolik/astro-cloudflare

Participation

alexanderniebuhr commented 7 months ago

I can not reproduce the issue using your linked repository and running astro build.

alexanderniebuhr commented 7 months ago

Closing this issue due to missing reproduction. If a minimal reproduction is added, I'm happy to reopen this.