- 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 | 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 | 7 | const nextConfig: NextConfig = { |
| 4 | − // Required for Turbopack (Next.js 16 default) – even if empty, | |
| 5 | − // it silences the "no turbopack config" warning. | |
| 6 | − turbopack: {}, | |
| 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). | |
| 8 | + turbopack: { | |
| 9 | + root: workspaceRoot, | |
| 10 | + }, | |
| 9 | 11 | transpilePackages: ["@executor/contracts"], |
| 10 | 12 | }; |
| 11 | 13 | |
| @@ -1,7 +1,6 @@ | ||
| 1 | 1 | { |
| 2 | 2 | "$schema": "https://openapi.vercel.sh/vercel.json", |
| 3 | − "buildCommand": "bun run --cwd apps/web build", | |
| 4 | − "outputDirectory": "apps/web/.next", | |
| 3 | + "framework": "nextjs", | |
| 5 | 4 | "installCommand": "bun install", |
| 6 | − "framework": "nextjs" | |
| 5 | + "buildCommand": "bun run --cwd apps/web build" | |
| 7 | 6 | } |