summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Matthew Phillips <matthew@skypack.dev> 2022-10-28 14:48:20 -0400
committerGravatar GitHub <noreply@github.com> 2022-10-28 14:48:20 -0400
commit070da6a7926892917f9a3077cd644bd3a1b87e76 (patch)
tree705b9e586db05da79178872a1e58c91e68c4c7bf
parent83fd26595056c135ab32a9537f7bb884ec3e68c3 (diff)
downloadastro-070da6a7926892917f9a3077cd644bd3a1b87e76.tar.gz
astro-070da6a7926892917f9a3077cd644bd3a1b87e76.tar.zst
astro-070da6a7926892917f9a3077cd644bd3a1b87e76.zip
Throw error when trying to use the vercel static adapter in server mode (#5241)
-rw-r--r--.changeset/neat-cooks-fail.md5
-rw-r--r--packages/integrations/vercel/src/static/adapter.ts4
2 files changed, 9 insertions, 0 deletions
diff --git a/.changeset/neat-cooks-fail.md b/.changeset/neat-cooks-fail.md
new file mode 100644
index 000000000..18cd44b29
--- /dev/null
+++ b/.changeset/neat-cooks-fail.md
@@ -0,0 +1,5 @@
+---
+'@astrojs/vercel': patch
+---
+
+Fixes unknown error when using vercel/static
diff --git a/packages/integrations/vercel/src/static/adapter.ts b/packages/integrations/vercel/src/static/adapter.ts
index abc9483f5..454c42432 100644
--- a/packages/integrations/vercel/src/static/adapter.ts
+++ b/packages/integrations/vercel/src/static/adapter.ts
@@ -22,6 +22,10 @@ export default function vercelStatic(): AstroIntegration {
'astro:config:done': ({ setAdapter, config }) => {
setAdapter(getAdapter());
_config = config;
+
+ if(config.output === 'server') {
+ throw new Error(`${PACKAGE_NAME} should be used with output: 'static'`);
+ }
},
'astro:build:start': async () => {
// Ensure to have `.vercel/output` empty.