I understand that preserveAllComments follow a heuristic but it seems quite wrong in this case and leads to some weird behavior in our application that relies on comments to be close to the AST node that they were placed against. We were hoping you might be able to do something about this for us.
Describe the bug
I understand that
preserveAllComments
follow a heuristic but it seems quite wrong in this case and leads to some weird behavior in our application that relies on comments to be close to the AST node that they were placed against. We were hoping you might be able to do something about this for us.Input code
Config
Playground link
https://play.swc.rs/?version=1.2.185&code=H4sIAAAAAAAAA0utKMgvKlFIK81LLsnMz1NI1NBUqOZSAIL0nPykxJyQjMxiBX19e65aAI2m0qAqAAAA&config=H4sIAAAAAAAAAz2OMQ7CMAxF7%2BK5AzChboiJgUNYxkVBdRzZDqKqencSEGxfT8%2F%2Fe4WHE4wrFDRn68mXHPiCEWIp7GSpBAwQ3lBY5QFuTGoYag7jhLN3tGSURBcpavH1tnZjmH1Sk15rjBSfUHMk4TaANVQwEsHWbbQ7NwPYD7v9sW0W4%2FbTk0%2FzfFYRzuH%2FbtdqxFcsP%2FQGyaRUqsoAAAA%3D
Expected behavior
Actual behavior
Version
@swc/cli@0.1.57, @swc/core@1.2.185
Additional context
No response