Feature request: SWC Plugins in Next.js #30212
Replies: 5 comments 7 replies
-
Is there a way to customize swc configuration with your own plugins? We have our own babel plugins and could refactor them to swc, but I coudn't find any info on how to use them - neither in nextjs docs nor in swc |
Beta Was this translation helpful? Give feedback.
-
Same here. Is in the roadmap provide this API to add plugins in next.config? or right now there is something that I have not seen yet. |
Beta Was this translation helpful? Give feedback.
-
I keep hitting walls with a bunch of side- and work-related projects that require or benefit from compile-time code-transformations. These things don‘t seem to be reasonably doable with next 12. Since next is a major player in our eco-system I assume a lot of library authors face the same dilemma. @leerob is there any roadmap or discussion you can share on enabling this matter? |
Beta Was this translation helpful? Give feedback.
-
We're still doing research on a solution for plugins with SWC and Next.js 👍 |
Beta Was this translation helpful? Give feedback.
-
@tomitrescak did you get JSX Control Statements working in Next.js/SWC? This is the only thing preventing us from using the SWC compiler... |
Beta Was this translation helpful? Give feedback.
-
Describe the feature you'd like to request
I would like to use SWC plugins
Describe the solution you'd like
I am old-school and I'm using jsx-components (If, Else). With babel there is a pretty great plugin for it (https://www.npmjs.com/package/babel-plugin-jsx-control-statements).
I wrote one for SWC and I would love to use it with Next.js
Describe alternatives you've considered
None
Beta Was this translation helpful? Give feedback.
All reactions