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
{{ message }}
Repository navigation
Make '@react-loadable/revised/babel' optional or add SWC plugin as alternative #7
We recently switched from babel to SWC compiler on our project.
Currently, we use react-loadable, but we would like to replace it with an actively maintainable alternative.
One this that stops us from switching to react-loadable/revised is the fact that '@react-loadable/revised/babel' is required.
Is it possible to somehow make '@react-loadable/revised/babel' optional and replace it with a custom implementation?
OR
Any chance we could expect SWC plugin as an alternative for '@react-loadable/revised/babel'?
I tried to skip using babel plugin and manually add modules and webpack properties. It worked. Although I had a few other errors and issues with @react-loadable/revised, however, they weren't related to the absence of the babel plugin. Still trying to understand what causes the errors and issues by debugging the source code.
Activity
tranvansang commentedon May 27, 2023
Thanks for your interest:
If you read the readme.md (https://github.com/react-loadable/revised/tree/1dc9ff6b16ca06cde778320c57f633efac7e7c3f#babel-config), there is explanation on what the babel plugin does.
You can manually insert the transformation in the code. Then babel plugin can be opted out.
alexmartynenkozoomin commentedon May 30, 2023
Hi @tranvansang
I tried to skip using babel plugin and manually add
modulesandwebpackproperties. It worked. Although I had a few other errors and issues with@react-loadable/revised, however, they weren't related to the absence of the babel plugin. Still trying to understand what causes the errors and issues by debugging the source code.Thank you