File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -7,18 +7,18 @@ import sentry from '@sentry/astro';
77import spotlightjs from '@spotlightjs/astro' ;
88
99
10- // 判断是否在 Zeabur 构建 (通过环境变量 )
11- const IS_ZEABUR = process . env . DEPLOY_PLATFORM === 'zeabur ' ;
10+ // 判断是否在 Vercel 环境 (Vercel 平台自带此变量 )
11+ const IS_VERCEL = process . env . VERCEL === '1 ' ;
1212
1313export default defineConfig ( {
1414 // 开启 SSR (服务端渲染) 模式
1515 output : 'server' ,
1616
17- // 动态选择适配器:
18- // 如果是 Zeabur 就用 Node 模式,否则默认用 Vercel 模式
19- adapter : IS_ZEABUR
20- ? node ( { mode : 'standalone' } )
21- : vercel ( { } ) ,
17+ // 逻辑反转:如果是 Vercel,用 Vercel 适配器;
18+ // 否则( Zeabur、本地、Docker),统统用 Node 适配器。
19+ adapter : IS_VERCEL
20+ ? vercel ( { } )
21+ : node ( { mode : 'standalone' } ) ,
2222
2323 // 启用 Svelte 支持
2424 integrations : [ svelte ( ) , sentry ( ) , spotlightjs ( ) ] ,
You can’t perform that action at this time.
0 commit comments