Skip to content

Commit

Permalink
fix(nextjs): use posix path format for generated config.distdir (#8990)
Browse files Browse the repository at this point in the history
ISSUES CLOSED: #8989
  • Loading branch information
lourd committed Mar 10, 2022
1 parent 55f7e72 commit 5cebe9c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/next/src/utils/config.ts
@@ -1,4 +1,8 @@
import { ExecutorContext, offsetFromRoot } from '@nrwl/devkit';
import {
ExecutorContext,
offsetFromRoot,
joinPathFragments,
} from '@nrwl/devkit';
// ignoring while we support both Next 11.1.0 and versions before it
// @ts-ignore
import type { NextConfig } from 'next/dist/server/config-shared';
Expand Down Expand Up @@ -165,7 +169,7 @@ export async function prepareConfig(
config.distDir =
config.distDir && config.distDir !== '.next'
? config.distDir
: join(config.outdir, '.next');
: joinPathFragments(config.outdir, '.next');
config.webpack = (a, b) =>
createWebpackConfig(
context.root,
Expand Down

0 comments on commit 5cebe9c

Please sign in to comment.