fix(js): pass configName to typecheck command in TS plugin#34989
Merged
Conversation
The typecheck target was ignoring the `configName` option, always using the default tsconfig. The build target already passed `configName` correctly — apply the same pattern to typecheck.
✅ Deploy Preview for nx-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for nx-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
|
View your CI Pipeline Execution ↗ for commit 3b98122
☁️ Nx Cloud last updated this comment at |
FrozenPandaz
approved these changes
Mar 24, 2026
FrozenPandaz
pushed a commit
that referenced
this pull request
Mar 26, 2026
## Current Behavior The `@nx/js` TypeScript plugin ignores the `configName` option when constructing the typecheck target command. It always runs `tsc --build --emitDeclarationOnly` without specifying which tsconfig to use, defaulting to whatever `tsc` resolves on its own. This means custom `configName` values (e.g. `tsconfig.lib.json`) have no effect on typechecking. ## Expected Behavior The typecheck target should pass `configName` to the `tsc --build` command, matching how the build target already works: `tsc --build <configName> --emitDeclarationOnly`. ## Related Issue(s) Fixes #34274 (cherry picked from commit 9cca97f)
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Current Behavior
The
@nx/jsTypeScript plugin ignores theconfigNameoption when constructing the typecheck target command. It always runstsc --build --emitDeclarationOnlywithout specifying which tsconfig to use, defaulting to whatevertscresolves on its own. This means customconfigNamevalues (e.g.tsconfig.lib.json) have no effect on typechecking.Expected Behavior
The typecheck target should pass
configNameto thetsc --buildcommand, matching how the build target already works:tsc --build <configName> --emitDeclarationOnly.Related Issue(s)
Fixes #34274