Replies: 1 comment 1 reply
-
Babel does not focus on preserving / removing whitespaces from the generated result. You can pass the generated code to a formatter, e.g. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Use parse to convert JS code into ast structure
Adjust the structure accordingly
Use generator to convert AST to JS code
Problem: a lot of new lines are found, because there are a lot of code replaced, so "retain lines" cannot be used, otherwise there will be large empty lines
Beta Was this translation helpful? Give feedback.
All reactions