25 lines
577 B
JavaScript
25 lines
577 B
JavaScript
import { dirname, resolve } from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
|
|
const repoRoot = resolve(dirname(fileURLToPath(import.meta.url)), "../..");
|
|
|
|
/** @type {import('next').NextConfig} */
|
|
const nextConfig = {
|
|
reactStrictMode: true,
|
|
outputFileTracingRoot: repoRoot,
|
|
async rewrites() {
|
|
const backendUrl = process.env.BACKEND_URL ?? "http://localhost:8000";
|
|
return [
|
|
{
|
|
source: "/api/:path*",
|
|
destination: `${backendUrl}/api/:path*`,
|
|
},
|
|
];
|
|
},
|
|
turbopack: {
|
|
root: repoRoot,
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|