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): Update Next.js page generator to support app/ router #17394

Conversation

ndcunningham
Copy link
Contributor

@ndcunningham ndcunningham commented Jun 2, 2023

If you have a Next.js project that uses app/ router, when you run the page generator

npx nx generate @nx/next:page about --project=my-project --no-interactive --dry-run 

it should generate something similar to this


>  NX  Generating @nx/next:page

CREATE app/about/page.module.css
CREATE app/about/page.tsx

closes: #17352

@ndcunningham ndcunningham requested a review from a team as a code owner June 2, 2023 17:54
@ndcunningham ndcunningham requested a review from xiongemi June 2, 2023 17:54
@vercel
Copy link

vercel bot commented Jun 2, 2023

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

Name Status Preview Comments Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 2, 2023 6:21pm

@ndcunningham ndcunningham force-pushed the fix/nextjs-page-generator-support-app-router branch from 687cc6a to a7e287f Compare June 2, 2023 18:12
@ndcunningham ndcunningham force-pushed the fix/nextjs-page-generator-support-app-router branch from a7e287f to 6d53832 Compare June 2, 2023 18:13
@ndcunningham ndcunningham enabled auto-merge (squash) June 2, 2023 18:38
@ndcunningham ndcunningham merged commit 02d9486 into nrwl:master Jun 2, 2023
@ndcunningham ndcunningham deleted the fix/nextjs-page-generator-support-app-router branch June 2, 2023 18:55
@github-actions
Copy link

github-actions bot commented Jun 8, 2023

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 Jun 8, 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.

nextjs pages are generated in the wrong directory
2 participants