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): handle buildable libs correctly #15795

Merged
merged 1 commit into from
Mar 21, 2023

Conversation

jaysoo
Copy link
Member

@jaysoo jaysoo commented Mar 21, 2023

The method to determine incremental builds is broken. This PR patches that logic.

Current Behavior

Buildable libs cannot be consumed unless it is built.

Expected Behavior

Buildable libs should build from source unless --buildLibsFromSource=false is passed.

Related Issue(s)

Fixes #15785

@vercel
Copy link

vercel bot commented Mar 21, 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 21, 2023 at 2:07PM (UTC)

@jaysoo jaysoo marked this pull request as ready for review March 21, 2023 13:37
@nx-cloud
Copy link

nx-cloud bot commented Mar 21, 2023

☁️ Nx Cloud Report

CI is running/has finished running commands for commit d39df2c. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

@@ -134,7 +134,7 @@ export function withNx(
} = getNxContext(graph, originalTarget);
const projectDirectory = projectNode.data.root;

if (!options.buildLibsFromSource && targetName) {
if (options.buildLibsFromSource === false && targetName) {
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the fix, because we're not getting the default value from schema.json so we need to check if it is explicitly set to false, not just falsy.

@jaysoo jaysoo merged commit 63cdddf into nrwl:master Mar 21, 2023
@jaysoo jaysoo deleted the fix/nextjs-buildable-libs branch March 21, 2023 15:21
FrozenPandaz pushed a commit that referenced this pull request Mar 22, 2023
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 26, 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.

Nx NextJS can't import js lib
2 participants