This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Allow using a function in transform
for the SWC modularized imports
#36055
Labels
SWC
Related to minification/transpilation in Next.js.
Describe the feature you'd like to request
From #34969, it would be great if it were possible to allow the transformer to allow functions (similar to that of function transformer from babel-plugin-transform-imports).
Right now, I'm trying to import a react component library that uses hyphen-case as its naming convention and currently there is no way of doing so - there's only helpers for uppercase, lowercase and camel case. An example import:
Describe the solution you'd like
Either one of two solutions:
hypenCase
helper to the handlebars transform function similar to that of the other provided helpersm i.e.@our-design-system/dist/components/{{ hypenCase member}}
. Although this doesn't give us enough power of the transformations compared to option 2.transform
to accept a function similar to that from babel-plugin-transform-imports)Describe alternatives you've considered
The only other solution is to just defer back to
babel.config.js
and use babel plugins.The text was updated successfully, but these errors were encountered: