fix(build): pin turbopack.root, update comment for middleware to proxy rename (#897)
Pins turbopack.root to the project directory so a parent-directory lockfile cannot make Turbopack misdetect the workspace root, and updates a stale comment reference (middleware.ts is now proxy.ts). The rename itself already landed on main.
This commit is contained in:
@@ -26,7 +26,7 @@ export async function GET(request: NextRequest) {
|
||||
cookiesToSet.forEach((cookie) => {
|
||||
// Mirror the cookie into request.cookies so subsequent getAll()
|
||||
// calls within this request lifecycle return the updated values
|
||||
// (matches the pattern used in middleware.ts).
|
||||
// (matches the pattern used in proxy.ts).
|
||||
request.cookies.set(cookie.name, cookie.value)
|
||||
pendingCookies.push(cookie)
|
||||
})
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
import path from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import type { NextConfig } from "next";
|
||||
import createNextIntlPlugin from "next-intl/plugin";
|
||||
|
||||
const withNextIntl = createNextIntlPlugin("./i18n/request.ts");
|
||||
|
||||
const projectRoot = path.dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
const isDev = process.env.NODE_ENV === "development";
|
||||
|
||||
const supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_URL ?? "";
|
||||
@@ -33,6 +37,11 @@ const cspDirectives = [
|
||||
|
||||
const nextConfig: NextConfig = {
|
||||
output: 'standalone',
|
||||
// Multiple lockfiles exist above this project (e.g. a parent yarn.lock),
|
||||
// which makes Turbopack infer the wrong workspace root. Pin it explicitly.
|
||||
turbopack: {
|
||||
root: projectRoot,
|
||||
},
|
||||
async redirects() {
|
||||
return [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user