UNPKG

vike

Version:

The Framework *You* Control - Next.js & Nuxt alternative for unprecedented flexibility and dependability.

24 lines (23 loc) 672 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isRuntimeEnvMatch = isRuntimeEnvMatch; function isRuntimeEnvMatch(configEnv, runtime) { // Runtime if (!runtime.isForClientSide) { if (!configEnv.server) return false; } else { if (!configEnv.client) return false; if (configEnv.client === 'if-client-routing' && !runtime.isClientRouting) return false; } // Production/development if ( // (configEnv.production === true && runtime.isDev) || (configEnv.production === false && !runtime.isDev)) return false; return true; }