Skip to content

Make '@react-loadable/revised/babel' optional or add SWC plugin as alternative #7

Open

Description

@alexmartynenkozoomin

Hi!

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'?

Thank you.

Activity

  1. tranvansang commented on May 27, 2023

    @tranvansang
    Contributor

    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.

    image

  2. alexmartynenkozoomin commented on May 30, 2023

    @alexmartynenkozoomin
    Author

    Hi @tranvansang

    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.

    Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions