Skip to content

Commit 578f5c0

Browse files
authored
fix(nextjs): incorrect path when serving production builds (#14553)
closed #14507
1 parent d43d6b6 commit 578f5c0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/next/src/executors/server/server.impl.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ export default async function* serveExecutor(
4747
parseTargetString(options.buildTarget, context.projectGraph),
4848
context
4949
);
50-
const root = resolve(context.root, buildOptions.root);
50+
const root = resolve(
51+
context.root,
52+
options.dev ? buildOptions.root : buildOptions.outputPath
53+
);
5154
const config = await prepareConfig(
5255
options.dev ? PHASE_DEVELOPMENT_SERVER : PHASE_PRODUCTION_SERVER,
5356
buildOptions,

0 commit comments

Comments
 (0)