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(js): remove hardcoded source-maps option from swc compile command #9189

Closed
wants to merge 1 commit into from

Conversation

Tirke
Copy link

@Tirke Tirke commented Mar 4, 2022

ISSUES CLOSED: #9187

Current Behavior

let swcCmd = `npx swc ${srcPath} -d ${destPath} --source-maps --no-swcrc --config-file=${swcrcPath}`;

--source-maps is hardcoded so adding "sourceMaps": false, to your .swcrc has no effect.
Is there any reason why this parameter is hardcoded?

Expected Behavior

I should be able to disable sourcemaps on swc compile.

Related Issue(s)

Fixes #9187

@nx-cloud
Copy link

nx-cloud bot commented Mar 4, 2022

☁️ Nx Cloud Report

CI ran the following commands for commit 7b36619. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 7 targets

Sent with 💌 from NxCloud.

@vercel
Copy link

vercel bot commented Mar 4, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/nrwl/nx-dev/EyTm4MqDPDovRDeaaNqu6G2SC9TP
✅ Preview: Canceled

@nartc
Copy link
Contributor

nartc commented Mar 4, 2022

Thank you @Tirke for the contribution. However, removing just the hardcoded portion from the CLI command isn't enough. Since the behavior has been "sourceMaps is always true", we'd need to update .swcrc to include sourceMaps: true by default to not break people.

That said, I've been working on adjusting .swcrc as a separate story so I included the fix in my PR as well. #9198

@nartc nartc closed this Mar 4, 2022
@Tirke Tirke deleted the fix-swc-source-maps branch March 6, 2022 21:02
@Tirke
Copy link
Author

Tirke commented Mar 6, 2022

@nartc Thanks for taking time to respond.

@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 19, 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.

swc compile command has hardcoded sourcemaps
2 participants