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): inline dev-only dependencies and add e2e test to catch issues #16890

Merged
merged 1 commit into from
May 9, 2023

Conversation

jaysoo
Copy link
Member

@jaysoo jaysoo commented May 9, 2023

This PR moves the dev-only imports to the dev/build phase only. This prevents the imports from being added to the compiled next.config.js file.

Current Behavior

Expected Behavior

Related Issue(s)

Fixes #16882

@vercel
Copy link

vercel bot commented May 9, 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 May 9, 2023 4:50pm

@@ -177,6 +177,12 @@ describe('Next.js Applications', () => {
`dist/packages/${appName}/public/shared/ui/hello.txt`
);

// Check that compiled next config does not contain bad imports
const nextConfigPath = `dist/packages/${appName}/next.config.js`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we were adding a lint rule. Is this just a stand-in until we have that set up?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add the lint rule, but also want to make sure it doesn't get into the built file in case we missed something in lint.

@jaysoo jaysoo merged commit 854b180 into nrwl:master May 9, 2023
@jaysoo jaysoo deleted the issues/16882 branch May 9, 2023 17:30
FrozenPandaz pushed a commit that referenced this pull request May 9, 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 May 15, 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.

Production nextjs builds are missing @nx/js
2 participants