feat(config): 添加 VITE_CLOUDFLARE_SERVER_ENABLED 环境变量支持
Some checks failed
CI/CD Pipeline / playwright (push) Failing after 8m16s
CI/CD Pipeline / build-and-deploy (push) Has been skipped

This commit is contained in:
严浩
2025-10-26 20:13:37 +08:00
parent 463dcb269a
commit 5b0c0716fd
8 changed files with 26 additions and 9 deletions

View File

@@ -7,5 +7,9 @@ export function loadPlugin(_configEnv: ConfigEnv): PluginOption {
console.log('cloudflare plugin disabled in test mode');
return [];
}
if (process.env.VITE_CLOUDFLARE_SERVER_ENABLED !== 'true') {
console.log('cloudflare plugin disabled by env');
return [];
}
return [cloudflare()];
}