withastro / adapters

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

fix: remove vite.ssr.noExternal because it should use default. #231

Closed mrthiti closed 5 months ago

mrthiti commented 5 months ago

Changes

Docs

Should remove this.

image
changeset-bot[bot] commented 5 months ago

🦋 Changeset detected

Latest commit: b716b01acae8e22c857b50553f841102bb49cc7f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages | Name | Type | | ------------------------------------------------ | ----- | | @astrojs/cloudflare | Patch | | @test/astro-cloudflare-astro-dev-platform | Patch | | @test/astro-cloudflare-external-image-service | Patch | | @test/astro-cloudflare-no-output | Patch | | @test/astro-cloudflare-routes-json | Patch | | @test/astro-cloudflare-wasm | Patch | | @test/astro-cloudflare-with-solid-js | Patch | | @test/astro-cloudflare-wrangler-preview-platform | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

mrthiti commented 5 months ago

If we have client pre render such as generate image route that It error at build time. I think if we config onExternal=true that It transforms all dependencies, and it caused error below.

image

lilnasy commented 5 months ago

@mrthiti I'm not sure why qrcode would break because of this setting. It's hard to say whether this is the right solution without understanding the problem first.

Could you share a minimal project that breaks with the cloudflare adapter?

mrthiti commented 5 months ago

Hi @lilnasy This is mini project. Could you please "npm run build", it will error. https://github.com/mrthiti/astro-cloudflare-root-cause

alexanderniebuhr commented 5 months ago

@mrthiti Thank you for your reproduction, I'll create a new issue for it. The solution you proposed doesn't work for Cloudflare, because Cloudflare needs to have dependencies inlined on server build, which your solution disables.