import { dirname } from "node:path"; import { fileURLToPath } from "node:url"; import type { NextConfig } from "next"; const appRoot = dirname(fileURLToPath(import.meta.url)); const nextConfig: NextConfig = { outputFileTracingRoot: appRoot, turbopack: { root: appRoot, }, async rewrites() { return [ { source: "/api/:path*", destination: "http://127.0.0.1:9876/:path*", }, ]; }, }; export default nextConfig;