- Adjusted vercel.json to set the build command and maintain the framework specification for Next.js. - Enhanced next.config.ts to define the turbopack root using the workspace directory, ensuring proper resolution of workspace packages.
Unified · Split
| @@ -1,11 +1,13 @@ | |||
| 1 | import type { NextConfig } from "next"; | 1 | import type { NextConfig } from "next"; |
| 2 | import path from "node:path"; | ||
| 3 | import { fileURLToPath } from "node:url"; | ||
| 4 | |||
| 5 | const workspaceRoot = path.join(path.dirname(fileURLToPath(import.meta.url)), "..", ".."); | ||
| 2 | 6 | ||
| 3 | const nextConfig: NextConfig = { | 7 | const nextConfig: NextConfig = { |
| 4 | // Required for Turbopack (Next.js 16 default) – even if empty, | 8 | turbopack: { |
| 5 | // it silences the "no turbopack config" warning. | 9 | root: workspaceRoot, |
| 6 | turbopack: {}, | 10 | }, |
| 7 | // Transpile workspace packages so Next.js resolves their raw .ts sources | ||
| 8 | // when they appear in the type graph (e.g. convex/database.ts imports @executor/contracts). | ||
| 9 | transpilePackages: ["@executor/contracts"], | 11 | transpilePackages: ["@executor/contracts"], |
| 10 | }; | 12 | }; |
| 11 | 13 | ||
| @@ -1,7 +1,6 @@ | |||
| 1 | { | 1 | { |
| 2 | "$schema": "https://openapi.vercel.sh/vercel.json", | 2 | "$schema": "https://openapi.vercel.sh/vercel.json", |
| 3 | "buildCommand": "bun run --cwd apps/web build", | 3 | "framework": "nextjs", |
| 4 | "outputDirectory": "apps/web/.next", | ||
| 5 | "installCommand": "bun install", | 4 | "installCommand": "bun install", |
| 6 | "framework": "nextjs" | 5 | "buildCommand": "bun run --cwd apps/web build" |
| 7 | } | 6 | } |