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

Ensure TS compiler option to SWC config transformer respects inline source map option #726

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

behroozk
Copy link

Currently, the swc-node/register package does not respect the inlineSourceMap option from tsconfig. When inlineSourceMap is set to true, swc/register does not generate inline source maps. The issue is within the tsCompilerOptionsToSwcConfig function, where it only sets sourcemap property on the return object to true if the TS config sourceMap property is true, regardless of the inlineSourceMap property.

Also, per TS Config documentation (https://www.typescriptlang.org/tsconfig#inlineSourceMap), inlineSourceMap and sourcemap are mutually exclusive, therefore, both cannot be set to true.

This PR addresses this issue by checking for both of these TS config properties separately.

@CLAassistant
Copy link

CLAassistant commented Aug 29, 2023

CLA assistant check
All committers have signed the CLA.

@Brooooooklyn
Copy link
Member

@behroozk you need to update test snapshot as well

Copy link

@eamora-ab eamora-ab left a comment

Choose a reason for hiding this comment

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

LGTM

@kdy1 kdy1 self-assigned this Mar 4, 2024
@kdy1 kdy1 removed their assignment Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants