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
5 changes: 5 additions & 0 deletions .changeset/odd-grapes-live.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/cloudflare': patch
---

Fixes cold `astro dev` crashes when using the passthrough image service
1 change: 1 addition & 0 deletions packages/integrations/cloudflare/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@ export default function createIntegration({
'astro/actions/runtime/entrypoints/server.js',
'astro/actions/runtime/entrypoints/route.js',
'astro/assets',
'astro/assets/services/noop',
'astro/assets/runtime',
'astro/assets/utils/inferRemoteSize.js',
'astro/assets/fonts/runtime.js',
Expand Down
6 changes: 6 additions & 0 deletions packages/integrations/cloudflare/test/typegen-phase.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ describe('type generation phase (build and sync)', () => {
assert.ok(include.includes('astro/app/manifest'));
});

it('prebundles the passthrough image service for server environments', async () => {
const { configEnvironment } = await runConfigSetup('dev');
const include = configEnvironment('ssr', {})?.optimizeDeps?.include ?? [];
assert.ok(include.includes('astro/assets/services/noop'));
});

it('only prebundles the cache provider when Workers Caching is enabled', async () => {
const withoutCache = await runConfigSetup('dev');
const withoutCacheInclude =
Expand Down
Loading