import path from "node:path"; import { fileURLToPath } from "node:url"; const __dirname = path.dirname(fileURLToPath(import.meta.url)); /** @type {import('next').NextConfig} */ const nextConfig = { reactStrictMode: true, // The HF token is server-side only; no NEXT_PUBLIC_ exposure // API calls go through /api/proxy/* which adds Authorization header server-side // Standalone output for Docker — produces a minimal self-contained // server.js bundle. Final image stays ~150MB instead of ~1GB. output: "standalone", // Pin the trace root to this folder so Next 15 doesn't follow a parent // lockfile (e.g. /Users//package-lock.json) and produce confusing // warnings or copy unrelated files into the standalone output. outputFileTracingRoot: __dirname, }; export default nextConfig;