-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathbabel.config.js
More file actions
25 lines (24 loc) · 832 Bytes
/
babel.config.js
File metadata and controls
25 lines (24 loc) · 832 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
module.exports = (api) => {
const isWeb = process.env.EXPO_OS === 'web';
api.cache.using(() => isWeb);
return {
presets: [
[
'babel-preset-expo',
{
// Disable react-native-worklets and react-native-reanimated Babel
// plugins for web builds. Both resolve native-only modules that
// don't exist in Vercel's build environment. Reanimated v4 delegates
// to the worklets plugin internally, so both must be disabled.
// Set at top level because Metro worker processes on Vercel may
// not forward caller.platform to babel-preset-expo's web: {} options.
...(isWeb && { worklets: false, reanimated: false }),
web: {
worklets: false,
reanimated: false,
},
},
],
],
};
};