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
Many tools rely on "magic comments", such as /*#__PURE__*/ and /*@vite-ignore*/. These comments are currently stripped out by SWC when using jsc.minify, unless you set jsc.minify.format.comments to "all" (which will preserve even non-meaningful comments).
It would be nice if SWC would preserve comments that start with # or @ when using comments: "some". It makes sense because SWC itself adds /*#__PURE__*/ comments.
As a bonus, it would be nice if this was also configurable, so that custom comments like /*webpackIgnore*/ can also be preserved.
Babel plugin or link to the feature description
No response
Additional context
Terser has a similar feature called preserve-annotations which is currently no-op in SWC. It might be good to support this properly in SWC.
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 feature
Many tools rely on "magic comments", such as
/*#__PURE__*/
and/*@vite-ignore*/
. These comments are currently stripped out by SWC when usingjsc.minify
, unless you setjsc.minify.format.comments
to"all"
(which will preserve even non-meaningful comments).It would be nice if SWC would preserve comments that start with
#
or@
when usingcomments: "some"
. It makes sense because SWC itself adds/*#__PURE__*/
comments.As a bonus, it would be nice if this was also configurable, so that custom comments like
/*webpackIgnore*/
can also be preserved.Babel plugin or link to the feature description
No response
Additional context
Terser has a similar feature called
preserve-annotations
which is currently no-op in SWC. It might be good to support this properly in SWC.The text was updated successfully, but these errors were encountered: