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
I am trying to write a plugin to transform TypeScript enums to object literals. However swc executes plugin_transforms after typescript::strip_with_jsx so that enums are already transformed into IIFEs. Thus it will be harder to implement my plugin.
IMO it will be nice to have the original code exposed to plugins. For example some plugins may want to process type information. Maybe plugins can be executed before any built-in transformations?
However some plugins may want to process the transformed code. Simply change the execution order of plugins cannot cover all cases. In Babel, I am able to insert my plugin before or after the transformation (aka plugin-env) to fit my use cases.
Another problem is that existing plugins may have already depended on the current execution order. This will be a breaking change.
Is there any ideas?
Babel plugin or link to the feature description
No response
Additional context
No response
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
I am trying to write a plugin to transform TypeScript enums to object literals. However swc executes
plugin_transforms
aftertypescript::strip_with_jsx
so that enums are already transformed into IIFEs. Thus it will be harder to implement my plugin.IMO it will be nice to have the original code exposed to plugins. For example some plugins may want to process type information. Maybe plugins can be executed before any built-in transformations?
However some plugins may want to process the transformed code. Simply change the execution order of plugins cannot cover all cases. In Babel, I am able to insert my plugin before or after the transformation (aka plugin-env) to fit my use cases.
Another problem is that existing plugins may have already depended on the current execution order. This will be a breaking change.
Is there any ideas?
Babel plugin or link to the feature description
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: