Skip to content

Conversation

@j-piasecki
Copy link
Member

@j-piasecki j-piasecki commented Jun 30, 2022

Description

This PR adds an experimental SWC plugin implementation, allowing the use of Reanimated with SWC instead of Babel.

Huge thanks to @kwonoj for his initial work on this.

Changes

  • Added SWC plugin

Test code and steps to reproduce

At the moment the tests for the Babel and SWC plugin are separate due to some cosmetic differences in the outputed code, and absolute paths.

Publishing

In order to build the plugin, you need to have Rust installed and you have to add wasm target: rustup target add wasm32-wasi. With Rust ready, you can simply use yarn build:plugin to compile the plugin. If you want to create the release build, add --release flag to the command.
Since prepack script is set to yarn build:plugin --release, there isn't anything special to do when publishing, except setting correct versions.

Checklist

  • Included code example that can be used to test this change
  • Updated TS types
  • Added TS types tests
  • Added unit / integration tests
  • Updated documentation
  • Ensured that CI passes

@j-piasecki j-piasecki marked this pull request as ready for review November 3, 2022 15:36
@nandorojo
Copy link
Contributor

Looks like this isn't working with Next.js 13. Not sure if it's Next.js' fault or not.

I made a reproduction here: https://github.com/nandorojo/reanimated-next13-issue

Screenshot 2023-01-18 at 2 42 34 PM

@tjzel
Copy link
Collaborator

tjzel commented May 22, 2023

Waiting to be reopened in better times...

@tjzel tjzel closed this May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants