Skip to content

🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.

fix(next.config): update outputFileTracingRoot and turbopack root to use tracingRoot for consistent local builds

Bill Yang9cc84b825392
diff --git a/docs/next.config.mjs b/docs/next.config.mjs
index f51fc73c2..0ec71a725 100644
--- a/docs/next.config.mjs
+++ b/docs/next.config.mjs
@@ -19,12 +19,15 @@ const withNextIntl = createNextIntlPlugin({
const withMDX = createMDX();
+// Vercel packages monorepo builds relative to its supplied tracing root.
+// Keep local builds rooted in docs when that override is absent.
+const tracingRoot = process.env.NEXT_PRIVATE_OUTPUT_TRACE_ROOT || import.meta.dirname;
+
/** @type {import('next').NextConfig} */
const config = {
reactStrictMode: true,
- // Keep this independent app rooted here despite the parent pnpm workspace.
- outputFileTracingRoot: import.meta.dirname,
- turbopack: { root: import.meta.dirname },
+ outputFileTracingRoot: tracingRoot,
+ turbopack: { root: tracingRoot },
images: {
remotePatterns: [
{