Skip to content

Commit fc83887

Browse files
committed
demo: set turbopack.root to silence Next.js workspace root warning
Next.js 16 infers the workspace root by walking up to the topmost lockfile, which lands on ~/package-lock.json. Setting turbopack.root to the repo root gives the correct resolution scope for the symlinked @ably/ai-transport dependency.
1 parent 87c2535 commit fc83887

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1+
import path from 'path';
12
import type { NextConfig } from 'next';
23

4+
const repoRoot = path.resolve(__dirname, '..', '..', '..', '..');
5+
36
const nextConfig: NextConfig = {
47
serverExternalPackages: ['jsonwebtoken', 'ably'],
8+
turbopack: {
9+
root: repoRoot,
10+
},
511
};
612

713
export default nextConfig;
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1+
import path from 'path';
12
import type { NextConfig } from 'next';
23

4+
const repoRoot = path.resolve(__dirname, '..', '..', '..', '..');
5+
36
const nextConfig: NextConfig = {
47
serverExternalPackages: ['jsonwebtoken', 'ably'],
8+
turbopack: {
9+
root: repoRoot,
10+
},
511
};
612

713
export default nextConfig;

0 commit comments

Comments
 (0)