-
-
Notifications
You must be signed in to change notification settings - Fork 38
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 v10 breaks cloudflare build / wrangler preview with imageService: "compile"
and Astro's <Image />
component
#213
Comments
imageService: "compile", and
<Image />` componentimageService: "compile"
and Astro's <Image />
component
I thought we fixed this, but it came back.. The solution is to port the esbuild plugin to vite. I get to that as soon as possible.. |
Please try |
The build now fails completely with this message:
I've updated the example repo branch. |
"Fixing" the build like in this comment also works here. The preview works fine. |
@alexanderniebuhr is this also considered to be an issue somewhere upstream?
It looked it this could be fixed by this. Btw. I haven't yet tried any versions past v10, maybe it got also fixed in the meantime? Thanks! |
This is still on my list, it's still a workaround for an upstream limitation, but we'll need to use a workaround here. |
Same issue, but solved it with this comment TL;DRInstall the package version with the workaround pnpm add @astrojs/cloudflare@0.0.0-cf-deps-chunk-20240407075425 This results in having the {
...
"dependencies": {
"@astrojs/cloudflare": "0.0.0-cf-deps-chunk-20240407075425",
...
},
...
} And the ...
export default defineConfig({
...
adapter: cloudflare({
imageService: "compile",
...
experimental: {
manualChunks: ["sharp"]
}
}),
...
}); Works with build and preview. 👌 |
I don't expect this to be fixed by v11, but might be worth to try again. |
I updated the reproduction. Now there are less errors. Something still tries to use
Also |
Very good question, I'm not sure if everyone sees this. I want to fix this issue next though. |
Add this to your "browser": {
"fs": false,
"child_process": false
} |
Astro Info
Describe the Bug
When using v10 version of the adapter, hybrid output mode and
<Image/>
component on a prerendered path, with combination ofimageService: "compile"
in the configuration, wrangler preview fails. This was not the case with previous version, it looks like there are modules being bundled which should not be bundler.Steps to reproduce
What's the expected result?
imageService: "compile"
should not break the ouputted build for Cloudflare.Link to Minimal Reproducible Example
https://github.com/dallyh/astro-cf-10-issues/tree/image-service-compile
Participation
The text was updated successfully, but these errors were encountered: