Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 3.8k
chore(deps): upgrade next.js to 16.2.4#4460
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
60d540bdd08af0f40fa93b0602a2e037cb824c4c773abdafcde825d5File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,16 @@ | ||
| import { createEnv } from '@t3-oss/env-nextjs' | ||
| import { env as runtimeEnv } from 'next-runtime-env' | ||
| import { z } from 'zod' | ||
| /** | ||
| * Universal environment variable getter that works in both client and server contexts. | ||
| * - Client-side: Uses next-runtime-env for runtime injection (supports Docker runtime vars) | ||
| * - Server-side: Falls back to process.env when runtimeEnv returns undefined | ||
| * - Provides seamless Docker runtime variable support for NEXT_PUBLIC_ vars | ||
| * Reads NEXT_PUBLIC_* env vars in both client and server contexts. | ||
| * Client reads `window.__ENV` (populated by `<PublicEnvScript>`); server reads `process.env`. | ||
| * We do not use next-runtime-env's `env()` helper because it calls `unstable_noStore()`, | ||
| * which Next 16.2+ rejects outside a request scope. | ||
| */ | ||
| const getEnv = (variable: string) => runtimeEnv(variable) ?? process.env[variable] | ||
| const getEnv = (variable: string): string | undefined => { | ||
| if (typeof window === 'undefined') return process.env[variable] | ||
| return window.__ENV?.[variable] ?? process.env[variable] | ||
| } | ||
waleedlatif1 marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| // biome-ignore format: keep alignment for readability | ||
| export const env = createEnv({ | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.