lauri
lauri
CDCloudflare Developers
Created by lauri on 4/29/2025 in #workers-help
@cloudflare/vite-plugin breaks vite build
We have a custom setup with vite+react. Everything works great in dev, but when we build with the cloudflare plugin enabled, it turns our SPA build into an SSR build or a like (spawns 3-4 parallel build processes, which break some other plugins) Conditionally enabling the cloudflare plugin in development helps, but we're wondering if it removes any build processing as a result? At first glance the deployment seems to work great. mode === "development" && cloudflare()
2 replies
CDCloudflare Developers
Created by lauri on 10/18/2024 in #general-help
ERROR 9519: Could not fetch the image — the server returned HTTP error 522 <unknown status code>
I'm trying to resize an image with cloudflare workers. Works fine on production, but gives an undocumented error when the images is on *.pages.dev domain.
const imageRequest = new Request(imgUrl, {
headers: request.headers,
});

const response = await fetch(imageRequest, {
cf: {
image: {
width: 1000,
height: 1000,
metadata: "none",
}
},
});
const imageRequest = new Request(imgUrl, {
headers: request.headers,
});

const response = await fetch(imageRequest, {
cf: {
image: {
width: 1000,
height: 1000,
metadata: "none",
}
},
});
Would love to have a parity between deployment previews and production deployments.
5 replies