Shahryar
SDSWC Developers
•Created by Shahryar on 1/12/2025 in #questions
Emitter in SWC does not add expected space after '=>' in Arrow Functions
Hello friends, I am new to rust and SWC, I hope I am not wasting your time 🥹🙏🏻
I edited with extra space.
Now I want to edit the
add
to adds
, I is more than 2000 character and discord dose not let me send the code, so I put it in gist: https://gist.github.com/shahryarjb/6f314fa7fab85fb09751bb8146c919f3
My problem is it returns
but I need to have an space after =>
and before{}
like this
how can do it?
Thank you in advance6 replies
SDSWC Developers
•Created by Shahryar on 1/10/2025 in #questions
Does SWC remove comments in the code when transforming a JS file's AST and converting it back to a c
Hello friends, I'm quite new to Rust. Recently, I used OXC in my Elixir project with NIF to modify JS files in my CLI. Unfortunately, after making changes to the JS file, all the comments above functions or within the code are removed, which is a major issue for me. Before diving into SWC, I wanted to ask if this library exhibits the same behavior.
My next question is whether SWC supports converting the entire AST to JSON and vice versa, particularly from JSON back to AST.
My current requirement is focused on JS files.
Thanks in advance!
6 replies