Pre-process instead of modifying the AST
nedjulius opened this issue · comments
Related to #1
It seems that there is no good way to preserve line separated groups, besides preprocessing the code with babel and then replacing stylex.create
or stylex.keyframes
text with the newly generated code string.
This technique is employed by the prettier-plugin-sort-imports
plugin as well. The only drawback is that it may take longer to sort the keys.