mirror of
https://github.com/jakejarvis/sofa.git
synced 2026-08-29 01:35:39 -04:00
Renames the env var for clarity since it holds a read access token, not an API key. Adds optional TMDB_API_BASE_URL and TMDB_IMAGE_BASE_URL env vars for advanced users. Centralizes image URL construction into a shared tmdbImageUrl() helper, replacing hardcoded URLs across all components. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
25 lines
498 B
TypeScript
25 lines
498 B
TypeScript
import type { NextConfig } from "next";
|
|
|
|
const imageBaseUrl = process.env.TMDB_IMAGE_BASE_URL || "";
|
|
const imageHost = imageBaseUrl
|
|
? new URL(imageBaseUrl).hostname
|
|
: "image.tmdb.org";
|
|
|
|
const nextConfig: NextConfig = {
|
|
output: "standalone",
|
|
reactCompiler: true,
|
|
env: {
|
|
TMDB_IMAGE_BASE_URL: process.env.TMDB_IMAGE_BASE_URL || "",
|
|
},
|
|
images: {
|
|
remotePatterns: [
|
|
{
|
|
protocol: "https",
|
|
hostname: imageHost,
|
|
},
|
|
],
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|