Files
message-inbox-web-frontend-sdk/apps/web/lib/config.ts
T
2026-07-17 21:48:37 +05:30

13 lines
451 B
TypeScript

import { resolveConfig, type SdkConfig } from "@lynkd/messaging-inbox-sdk";
/**
* Resolve the SDK config on the server from process.env, so feature flags and
* theme are decided by NEXT_PUBLIC_* env at request time and handed to the
* client as plain JSON (no dynamic env access in the browser bundle).
*/
export function getServerConfig(): SdkConfig {
return resolveConfig({
env: process.env as Record<string, string | undefined>,
});
}