diff --git a/apps/web/app/env.ts b/apps/web/app/env.ts index d9a236b41..f6a5d746c 100644 --- a/apps/web/app/env.ts +++ b/apps/web/app/env.ts @@ -14,6 +14,15 @@ type ReturnedType = { readonly value: T extends string ? string : InferValue; }; +/** + * This function loads only env variables which start with NEXT_PUBLIC_* + * + * Usefull to get the latest value of variable at runtime instead of buildtime + * + * @param name + * @param options + * @returns + */ export function getNextPublicEnv>(name: string, options?: O): ReturnedType { return { get value() {