Throw error when trying to use the vercel static adapter in server mode (#5241)
This commit is contained in:
parent
83fd265950
commit
070da6a792
2 changed files with 9 additions and 0 deletions
5
.changeset/neat-cooks-fail.md
Normal file
5
.changeset/neat-cooks-fail.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'@astrojs/vercel': patch
|
||||
---
|
||||
|
||||
Fixes unknown error when using vercel/static
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue