diff options
author | 2022-07-27 11:50:48 -0400 | |
---|---|---|
committer | 2022-07-27 11:50:48 -0400 | |
commit | 54b33d50fdb995ac056461be7e2128d911624f2d (patch) | |
tree | a810eb5a69dae9cc48aab2e67decd927f2b6be4f /packages/integrations/cloudflare/src | |
parent | 57770bbae2dc339a4953e08d8c81b0db3b4f7812 (diff) | |
download | astro-54b33d50fdb995ac056461be7e2128d911624f2d.tar.gz astro-54b33d50fdb995ac056461be7e2128d911624f2d.tar.zst astro-54b33d50fdb995ac056461be7e2128d911624f2d.zip |
Add errors to cloudflare/vercel adapters when no output config (#4068)
Diffstat (limited to 'packages/integrations/cloudflare/src')
-rw-r--r-- | packages/integrations/cloudflare/src/index.ts | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/packages/integrations/cloudflare/src/index.ts b/packages/integrations/cloudflare/src/index.ts index 29341453c..37faf690e 100644 --- a/packages/integrations/cloudflare/src/index.ts +++ b/packages/integrations/cloudflare/src/index.ts @@ -23,12 +23,10 @@ export default function createIntegration(): AstroIntegration { _config = config; if (config.output === 'static') { - console.warn( - `[@astrojs/cloudflare] \`output: "server"\` is required to use this adapter.` - ); - console.warn( - `[@astrojs/cloudflare] Otherwise, this adapter is not required to deploy a static site to Cloudflare.` - ); + throw new Error(` + [@astrojs/cloudflare] \`output: "server"\` is required to use this adapter. Otherwise, this adapter is not necessary to deploy a static site to Cloudflare. + +`); } }, 'astro:build:start': ({ buildConfig }) => { |