Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(nextjs): set correct distDir when running production server through Nx #15861

Merged
merged 1 commit into from
Mar 23, 2023

Conversation

jaysoo
Copy link
Member

@jaysoo jaysoo commented Mar 23, 2023

This PR fixes an issue where nx serve <app> --prod is broken because distDir is pointing to the wrong directory. If we're running from Nx, the distDir must be read in from project configuration. Otherwise, default to .next for isolated deployments outside of the workspace.

Current Behavior

Expected Behavior

Related Issue(s)

Fixes #

@vercel
Copy link

vercel bot commented Mar 23, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated
nx-dev ⬜️ Ignored (Inspect) Mar 23, 2023 at 4:28PM (UTC)

@jaysoo jaysoo force-pushed the fix/nextjs-prod-server branch 2 times, most recently from 74c4310 to b032b0c Compare March 23, 2023 16:22
@jaysoo jaysoo enabled auto-merge (squash) March 23, 2023 16:45
@jaysoo jaysoo merged commit b3200fb into nrwl:master Mar 23, 2023
@jaysoo jaysoo deleted the fix/nextjs-prod-server branch March 23, 2023 16:57
FrozenPandaz pushed a commit that referenced this pull request Mar 23, 2023
@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants