You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All comments are reserved as format.comments is already set to "all"
Expected:
// a.tsconsta=1;// b.tsconstb=2;
Actual behavior
The first comment is striped, and the second comment's position is offset.
consta=1;// b.tsconstb=2;
Version
1.7.18
Additional context
The leading semicolon before comments is used by webpack when generating concatenated modules debug comments. The comment will lose if it can't be preserved.
The text was updated successfully, but these errors were encountered:
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.
Describe the bug
If a leading semicolon appears before a comment, the comment will still be stripped, even if the
format.comments
setting is set to "all".Input code
Config
Playground link (or link to the minimal reproduction)
https://play.swc.rs/?version=1.7.18&code=H4sIAAAAAAAAA7PW11dI1Csp5krOzysuUUhUsFUw5OKyBoomIUSTgKJGAMr7TWcqAAAA&config=H4sIAAAAAAAAA02NsQ7DIAxEd74Cec5QMfZvLGQiKiAIeyiK%2BPeaNImyWL53Z99urIUcSwwd3jZgYlom%2BrBXveuqomJjardWwr0IfpWA9ErsW6wChzmW%2F41gW0lmgti9nIOT3133r4xlTfRsP3DYWkZ5BJX5LWcqwvMtpgSnM8w1hxk%2FKrltzdIAAAA%3D
SWC Info output
No response
Expected behavior
All comments are reserved as
format.comments
is already set to"all"
Expected:
Actual behavior
The first comment is striped, and the second comment's position is offset.
Version
1.7.18
Additional context
The leading semicolon before comments is used by webpack when generating concatenated modules debug comments. The comment will lose if it can't be preserved.
The text was updated successfully, but these errors were encountered: