Skip to content

Commit

Permalink
fix(nextjs): incorrect path when serving production builds (#14553)
Browse files Browse the repository at this point in the history
closed #14507
  • Loading branch information
ndcunningham committed Jan 23, 2023
1 parent d43d6b6 commit 578f5c0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/next/src/executors/server/server.impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ export default async function* serveExecutor(
parseTargetString(options.buildTarget, context.projectGraph),
context
);
const root = resolve(context.root, buildOptions.root);
const root = resolve(
context.root,
options.dev ? buildOptions.root : buildOptions.outputPath
);
const config = await prepareConfig(
options.dev ? PHASE_DEVELOPMENT_SERVER : PHASE_PRODUCTION_SERVER,
buildOptions,
Expand Down

0 comments on commit 578f5c0

Please sign in to comment.