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

Retain lines #1131

Closed
avaly opened this issue Oct 4, 2020 · 3 comments
Closed

Retain lines #1131

avaly opened this issue Oct 4, 2020 · 3 comments

Comments

@avaly
Copy link

avaly commented Oct 4, 2020

Describe the feature

Babel has a feature where it can retain the same line numbers from the original source file.

This can be useful when you only use it to remove TS syntax, but keep the rest of the source file intact, and need to match line numbers from production error stack traces to original source code.

Is such a feature possible in swc, without degrading the performance?

Babel plugin or link to the feature description

https://babeljs.io/docs/en/options#retainlines

@avaly
Copy link
Author

avaly commented Oct 22, 2021

I am aware that sourcemaps are supposed to solve the original issue, but in large repositories with thousands of sourcemaps files uploading all of them on each release to a 3rd party error tracking software is slow.

The time benefits obtained by switched from babel to swc, get cancelled by having to deal with the sourcemaps.

@kwonoj
Copy link
Member

kwonoj commented Jul 26, 2023

Closing this for now, this could be a possible enhancement, but not something we are looking for immediately. We may revisit this later if things are changing.

@kwonoj kwonoj closed this as completed Jul 26, 2023
@kwonoj kwonoj closed this as not planned Won't fix, can't repro, duplicate, stale Jul 26, 2023
@swc-bot
Copy link
Collaborator

swc-bot commented Aug 26, 2023

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@swc-project swc-project locked as resolved and limited conversation to collaborators Aug 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants