feat(config): 添加 VITE_CLOUDFLARE_SERVER_ENABLED 环境变量支持
This commit is contained in:
@@ -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()];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user