Skip to content

Commit 9cb76fb

Browse files
Add the output option (#4015)
* Start of work on astroConfig.mode === 'server' * Add tests and more * adapter -> deploy in some places * Add fallback for `adapter` config * Update more tests * Update image tests * Fix clientAddress test * Updates based on PR review * Add a changeset * Update integrations tests + readme * Oops * Remove old option * Rename `mode` to `output` * Update Node adapter test * Update test * fred pass * fred pass * fred pass * fix test Co-authored-by: Fred K. Schott <fkschott@gmail.com>
1 parent f4c8b39 commit 9cb76fb

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

packages/integrations/cloudflare/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { defineConfig } from 'astro/config';
99
import cloudflare from '@astrojs/cloudflare';
1010

1111
export default defineConfig({
12+
output: 'server',
1213
adapter: cloudflare()
1314
});
1415
```

packages/integrations/cloudflare/src/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ export default function createIntegration(): AstroIntegration {
2121
'astro:config:done': ({ setAdapter, config }) => {
2222
setAdapter(getAdapter());
2323
_config = config;
24+
25+
if(config.output === 'static') {
26+
console.warn(`[@astrojs/cloudflare] \`output: "server"\` is required to use this adapter.`);
27+
console.warn(`[@astrojs/cloudflare] Otherwise, this adapter is not required to deploy a static site to Cloudflare.`);
28+
}
2429
},
2530
'astro:build:start': ({ buildConfig }) => {
2631
_buildConfig = buildConfig;

0 commit comments

Comments
 (0)