mirror of
https://github.com/arthur-pbty/flint.git
synced 2026-08-01 20:29:03 +02:00
Set turbopack.root to the monorepo root in next.config.mjs to resolve the Next.js Turbopack workspace root error.
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
import path from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
import createNextIntlPlugin from "next-intl/plugin";
|
||||
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
const withNextIntl = createNextIntlPlugin("./i18n/request.ts");
|
||||
|
||||
/** @type {import('next').NextConfig} */
|
||||
@@ -12,6 +17,10 @@ const nextConfig = {
|
||||
// IMPORTANT pour éviter les problèmes de paths en monorepo
|
||||
outputFileTracingRoot: process.cwd(),
|
||||
|
||||
turbopack: {
|
||||
root: path.join(__dirname, "..", ".."),
|
||||
},
|
||||
|
||||
// optimise build (optionnel mais recommandé)
|
||||
poweredByHeader: false,
|
||||
compress: true,
|
||||
|
||||
Reference in New Issue
Block a user