Skip to content

fix(js): avoid duplicate @nx/js/typescript plugin entries for non-buildable libs#34021

Merged
leosvelperez merged 1 commit intomasterfrom
gh-33981
Jan 7, 2026
Merged

fix(js): avoid duplicate @nx/js/typescript plugin entries for non-buildable libs#34021
leosvelperez merged 1 commit intomasterfrom
gh-33981

Conversation

@leosvelperez
Copy link
Member

Current Behavior

When adding a non-buildable JS library (bundler: 'none') to a workspace with an existing @nx/js/typescript plugin registration that has build options configured, a duplicate plugin entry is unnecessarily created in nx.json.

Expected Behavior

Non-buildable libraries reuse the existing plugin registration when skipBuildCheck: true is not specified, thereby avoiding duplicate entries in nx.json. The @nx/js/typescript plugin will infer the project as non-buildable because the library's package.json will have entry points pointing to source files, so there's no need for a separate plugin registration.

Related Issue(s)

Fixes #33981

@leosvelperez leosvelperez self-assigned this Jan 5, 2026
@leosvelperez leosvelperez requested a review from a team as a code owner January 5, 2026 15:45
@leosvelperez leosvelperez requested a review from Coly010 January 5, 2026 15:45
@vercel
Copy link

vercel bot commented Jan 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
nx-dev Ready Ready Preview Jan 6, 2026 4:04pm

@netlify
Copy link

netlify bot commented Jan 5, 2026

Deploy Preview for nx-docs ready!

Name Link
🔨 Latest commit 8677913
🔍 Latest deploy log https://app.netlify.com/projects/nx-docs/deploys/695d312f4dccd700089e7394
😎 Deploy Preview https://deploy-preview-34021--nx-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@nx-cloud
Copy link
Contributor

nx-cloud bot commented Jan 5, 2026

View your CI Pipeline Execution ↗ for commit 8677913

Command Status Duration Result
nx affected --targets=lint,test,test-kt,build,e... ✅ Succeeded 7m 4s View ↗
nx run-many -t check-imports check-lock-files c... ✅ Succeeded 2m 42s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 12s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 2s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2026-01-07 08:17:58 UTC

}
}

export function ensureProjectIsExcludedFromPluginRegistrations(
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 function was unused.

nx-cloud[bot]

This comment was marked as outdated.

Copy link
Contributor

@nx-cloud nx-cloud bot left a comment

Choose a reason for hiding this comment

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

Nx Cloud has identified a flaky task in your failed CI:

🔂 Since the failure was identified as flaky, we triggered a CI rerun by adding an empty commit to this branch.

Nx Cloud View detailed reasoning in Nx Cloud ↗


🎓 Learn more about Self-Healing CI on nx.dev

@leosvelperez leosvelperez merged commit 92f821d into master Jan 7, 2026
21 of 23 checks passed
@leosvelperez leosvelperez deleted the gh-33981 branch January 7, 2026 08:18
@github-actions
Copy link
Contributor

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 Jan 13, 2026
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.

In my ts project adding a new js library always creates a duplicate @nx/js/typescript plugin entry

2 participants