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 adapter: Unknown file extension ".wasm" on local but works on Cloudflare Pages. #433

Open
1 task
vikas5914 opened this issue Nov 5, 2024 · 1 comment

Comments

@vikas5914
Copy link

Astro Info

Astro                    v4.16.9
Node                     v22.10.0
System                   macOS (arm64)
Package Manager          npm
Output                   hybrid
Adapter                  @astrojs/cloudflare
Integrations             none

Describe the Bug

Hi,

I am trying to generate OG images using @cloudflare/pages-plugin-vercel-og and the Astro endpoint.

While running in local dev, I am getting this error:

Unknown file extension ".wasm" for /Users/vikaskapadiya/Project/personal/test-og-image/node_modules/@cloudflare/pages-plugin-vercel-og/dist/src/api/yoga.wasm

However, Running wrangler pages dev ./dist or deploying the project to Cloudflare pages works without any issue.

Live demo: https://astro-cloudflare-og-image.pages.dev/og/

What's the expected result?

It should work locally. According to the adapter docs, the Cloudflare adapter supports these files. (https://docs.astro.build/en/guides/integrations-guide/cloudflare/#cloudflare-module-imports)

Link to Minimal Reproducible Example

https://github.com/vikas5914/astro-cloudflare-og-image

Participation

  • I am willing to submit a pull request for this issue.
@kumardeo
Copy link

kumardeo commented Dec 11, 2024

Any updates?
The adapter resolves wasm imports in src directory but it doesn't if a package imports it internally.

While wrangler resolves both.

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

2 participants