New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(babel-preset-expo): auto add reanimated babel plugin when available #23798
feat(babel-preset-expo): auto add reanimated babel plugin when available #23798
Conversation
Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there ever a case where it is necessary to opt-out without removing react-native-reanimated, such as in a monorepo where another workspace package depends on react-native-reanimated?
@ide users can pass |
], | ||
``` | ||
|
||
After you add the Babel plugin, restart your development server and clear the bundler cache: `npx expo start --clear`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should probably add something here to indicate that you can remove the reanimated babel plugin that we automatically add, and link to the babel-preset-expo readme or docs for that
Why
One less thing to think about. However, installing the package would mean you need to magically know about invalidating the Metro Babel cache. To account for this the
expo/metro-config
will now auto-invalidate when the reanimated version changes. This invalidation also solves another common issue where the worklet format changes between versions.Test Plan
babel-preset-expo
and installing a tabs@49 template. If you installreact-native-reanimated
, then restart the server, worklets will be transpiled.Checklist
npx expo prebuild
& EAS Build (eg: updated a module plugin).