Skip to content

Commit 47e3648

Browse files
committed
chore(babel): enhance Babel configuration for web builds
- Updated Babel configuration to disable both react-native-worklets and react-native-reanimated plugins for web builds. This change addresses compilation issues in Vercel's environment by preventing the resolution of native-only modules.
1 parent 2923505 commit 47e3648

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

babel.config.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,16 @@ module.exports = (api) => {
77
[
88
'babel-preset-expo',
99
{
10-
// Disable react-native-worklets Babel plugin for web builds.
11-
// The plugin resolves native-only modules that don't exist in
12-
// Vercel's build environment, causing Metro compilation to fail.
10+
// Disable react-native-worklets and react-native-reanimated Babel
11+
// plugins for web builds. Both resolve native-only modules that
12+
// don't exist in Vercel's build environment. Reanimated v4 delegates
13+
// to the worklets plugin internally, so both must be disabled.
1314
// Set at top level because Metro worker processes on Vercel may
1415
// not forward caller.platform to babel-preset-expo's web: {} options.
15-
...(isWeb && { worklets: false }),
16+
...(isWeb && { worklets: false, reanimated: false }),
1617
web: {
1718
worklets: false,
19+
reanimated: false,
1820
},
1921
},
2022
],

0 commit comments

Comments
 (0)