import type { NextConfig } from "next"; import { join } from "node:path"; // In a pnpm workspace + Turbopack setup, Next can't always infer the monorepo // root (it walks up looking for next/package.json). Pin it explicitly so both // dev and production builds resolve files correctly inside the Docker image. const workspaceRoot = join(import.meta.dirname, "..", ".."); const nextConfig: NextConfig = { reactStrictMode: true, output: "standalone", outputFileTracingRoot: workspaceRoot, transpilePackages: ["@cmbot/db", "@cmbot/shared"], experimental: { typedRoutes: true, }, turbopack: { root: workspaceRoot, }, }; export default nextConfig;