Skip to content

Commit 222c189

Browse files
committed
fix: non-monorepo has 0 depth
1 parent 5e9f2af commit 222c189

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/build/plugin-context.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,9 @@ export class PluginContext {
110110
// because parts of application would be outside of "standalone" directory
111111
// - if it's not marked as external it will be included in next.js produced chunks
112112

113-
const depth = toPosixPath(this.relativeAppDir).split(posixSep).length
113+
const depth =
114+
this.relativeAppDir === '' ? 0 : toPosixPath(this.relativeAppDir).split(posixSep).length
115+
114116
const computedOutputFileTracingRoot = resolve(
115117
this.requiredServerFiles.appDir,
116118
...Array.from<string>({ length: depth }).fill('..'),

0 commit comments

Comments
 (0)