1 import path from "node:path";
2 import { fileURLToPath } from "node:url";
3
4 const __dirname = path.dirname(fileURLToPath(import.meta.url));
5
6 /** @type {import('next').NextConfig} */
7 const nextConfig = {
8 // Required by the smbCloud `nextjs-ssr` deploy path: produces `.next/standalone`.
9 output: "standalone",
10
11 // Serve the App Store screenshots as-is. Disabling the optimizer keeps the
12 // standalone server free of a runtime `sharp` dependency and the /_next/image
13 // route, which simplifies the multi-tenant smbCloud deploy.
14 images: {
15 unoptimized: true,
16 },
17
18 // This app lives in a pnpm workspace. Pin the tracing root to the repo root so
19 // Next.js traces hoisted dependencies deterministically instead of guessing from
20 // multiple lockfiles. Because the root is above this app, the standalone output
21 // preserves the source path (`.next/standalone/web/server.js`); the smbCloud CLI
22 // handles this nested runtime layout.
23 outputFileTracingRoot: path.join(__dirname, ".."),
24 };
25
26 export default nextConfig;