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(misc): prevent ts-node from reading tsconfig when registering transpiler #21381

Merged

Conversation

leosvelperez
Copy link
Member

@leosvelperez leosvelperez commented Jan 29, 2024

Current Behavior

When registering the ts-node transpiler, we provide the compiler options that were already read from the tsconfig file. Then, ts-node loads again the tsconfig file to read the same compiler options already provided.

Expected Behavior

When registering the ts-node transpiler we prevent ts-node from rereading the tsconfig file. The already provided compiler options are all that's needed.

Note: we should do something similar when registering the SWC transpiler (don't set the SWC_NODE_PROJECT env var), but there's currently an issue swc-project/swc-node#716 where provided compiler options are just plainly ignored and the config is always read. While that issue was already addressed, the fix hasn't been released yet: swc-project/swc-node#750. Even when it gets released, we probably can't rely on that unless we check which version it's installed in the workspace, because it might not contain the fix.

Related Issue(s)

Fixes #

@leosvelperez leosvelperez self-assigned this Jan 29, 2024
Copy link

vercel bot commented Jan 29, 2024

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

1 Ignored Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Jan 29, 2024 10:53am

@leosvelperez leosvelperez marked this pull request as ready for review January 29, 2024 11:11
@leosvelperez leosvelperez requested a review from a team as a code owner January 29, 2024 11:11
@leosvelperez leosvelperez merged commit 875143b into nrwl:master Jan 30, 2024
6 checks passed
@leosvelperez leosvelperez deleted the misc/ts-node-duplicated-read-tsconfig branch January 30, 2024 14:07
FrozenPandaz pushed a commit that referenced this pull request Jan 31, 2024
Copy link

github-actions bot commented Feb 5, 2024

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 Feb 5, 2024
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.

None yet

3 participants