how to use plugin like 'babel-plugin-import' #3042
-
Describe the featurehow to use plugin like 'babel-plugin-import' Babel plugin or link to the feature descriptionhttps://www.npmjs.com/package/babel-plugin-import Additional contextNo response |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 13 replies
-
This issue has moved into discussions, as this is a question which gh discussion is prepared for. |
Beta Was this translation helpful? Give feedback.
-
The only possible solution is to chain a babel before swc, and I'm still wondering why such a legacy plugin has such a common name. |
Beta Was this translation helpful? Give feedback.
-
Shameless plug. swc-plugin-transform-import does the similar thing. You can modify it according to your need. JS plugins are not the optimized for SWC but it does unblocks user to experiment with SWC. |
Beta Was this translation helpful? Give feedback.
-
Here's one implementation |
Beta Was this translation helpful? Give feedback.
-
Maybe you can try this, although it is a JS plugin swc-plugin-import-on-demand |
Beta Was this translation helpful? Give feedback.
The only possible solution is to chain a babel before swc, and I'm still wondering why such a legacy plugin has such a common name.