import path from "node:path"; import { fileURLToPath } from "node:url"; const workspaceRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), ".."); /** @type {import('next').NextConfig} */ const nextConfig = { reactCompiler: true, turbopack: { root: workspaceRoot, }, compiler: { removeConsole: process.env.NODE_ENV === "production", }, async rewrites() { return [ { source: "/api/:path*", destination: `${process.env.API_PROXY_TARGET ?? "http://127.0.0.1:3001"}/api/:path*`, }, ]; }, }; export default nextConfig;