Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/fast-planets-shout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@astrojs/cloudflare": patch
---

Clarifies and reduces a few logs when starting the dev server with `@astrojs/cloudflare`.

Warnings about sharp support will now be suppressed when you have explicitly set an `imageService` option.
18 changes: 8 additions & 10 deletions packages/integrations/cloudflare/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,16 +242,14 @@ export default function createIntegration(args?: Options): AstroIntegration {
hybridOutput: 'stable',
staticOutput: 'unsupported',
i18nDomains: 'experimental',
// For explicitly set image services, this hack is used to suppress the warning about using `sharp`
// by inferring the user is aware of its implications.
// TODO: If an option to supress the warnings for `supportedAstroFeatures` is added, we should use it instead.
sharpImageService: args?.imageService
? 'stable'
: {
support: 'limited',
message:
'Cloudflare does not support sharp at runtime. However, you can configure `image service: "compile"` to optimize images with sharp on prerendered pages during build time.',
},
sharpImageService: {
support: 'limited',
message:
'Cloudflare does not support sharp at runtime. However, you can configure `imageService: "compile"` to optimize images with sharp on prerendered pages during build time.',
// For explicitly set image services, we suppress the warning about sharp not being supported at runtime,
// inferring the user is aware of the limitations.
suppress: args?.imageService ? 'all' : 'default',
},
envGetSecret: 'stable',
},
});
Expand Down
57 changes: 26 additions & 31 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading