2026-04-20 15:10:54 +02:00
|
|
|
import type { NextConfig } from "next";
|
2026-07-01 23:54:48 +02:00
|
|
|
import path from "path";
|
2026-04-20 15:10:54 +02:00
|
|
|
|
|
|
|
|
// const BACKEND_URL = process.env.BACKEND_URL || "http://localhost:8000";
|
|
|
|
|
|
|
|
|
|
const nextConfig: NextConfig = {
|
|
|
|
|
output: "standalone",
|
|
|
|
|
|
2026-07-01 23:54:48 +02:00
|
|
|
// Pin the file-tracing root to this directory so `output: "standalone"` is
|
|
|
|
|
// deterministic regardless of stray lockfiles higher up the tree (e.g. a
|
|
|
|
|
// ~/package-lock.json). Without it Next can infer the wrong workspace root
|
|
|
|
|
// from a sibling lockfile and nest the standalone output, so `server.js`
|
|
|
|
|
// never lands at `.next/standalone/server.js` and `node server.js` fails.
|
|
|
|
|
outputFileTracingRoot: path.join(__dirname),
|
|
|
|
|
|
2026-04-20 15:10:54 +02:00
|
|
|
// // Proxy API calls to the backend to avoid CORS issues
|
|
|
|
|
// async rewrites() {
|
|
|
|
|
// return [
|
|
|
|
|
// {
|
|
|
|
|
// source: "/api/:path*",
|
|
|
|
|
// destination: `${BACKEND_URL}/api/:path*`,
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// source: "/ws/:path*",
|
|
|
|
|
// destination: `${BACKEND_URL}/ws/:path*`,
|
|
|
|
|
// },
|
|
|
|
|
// ];
|
|
|
|
|
// },
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default nextConfig;
|