Skip to content

Commit

Permalink
update babel configs
Browse files Browse the repository at this point in the history
  • Loading branch information
axeldelafosse committed Oct 25, 2021
1 parent 90a52bb commit 150e28d
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 224 deletions.
2 changes: 1 addition & 1 deletion babel.config.js
Expand Up @@ -3,7 +3,7 @@ module.exports = function (api) {

return {
babelrcRoots: ['.', './packages/*'],
presets: ['@expo/next-adapter/babel'],
presets: [['babel-preset-expo', { jsxRuntime: 'automatic' }]],
plugins: ['react-native-reanimated/plugin'],
overrides: [
{
Expand Down
3 changes: 3 additions & 0 deletions package.json
Expand Up @@ -16,5 +16,8 @@
"build": "cd packages/next && yarn build",
"deploy": "vercel --prod --no-clipboard",
"postinstall": "patch-package"
},
"resolutions": {
"babel-preset-expo": "^8.5.1"
}
}
1 change: 0 additions & 1 deletion packages/app/hello-world.tsx
@@ -1,4 +1,3 @@
import React from 'react';
import { View, Text, StyleSheet } from 'react-native';

export function HelloWorld() {
Expand Down
2 changes: 1 addition & 1 deletion packages/expo/.babelrc.js
Expand Up @@ -2,7 +2,7 @@ module.exports = function (api) {
api.cache(true);

return {
presets: ['@expo/next-adapter/babel'],
presets: [['babel-preset-expo', { jsxRuntime: 'automatic' }]],
plugins: ['react-native-reanimated/plugin']
};
};
7 changes: 6 additions & 1 deletion packages/next/.babelrc.json
@@ -1,4 +1,9 @@
{
"presets": ["@expo/next-adapter/babel"],
"plugins": ["react-native-reanimated/plugin"]
"plugins": [
["@babel/plugin-proposal-class-properties", { "loose": true }],
["@babel/plugin-proposal-private-methods", { "loose": true }],
["@babel/plugin-proposal-private-property-in-object", { "loose": true }],
"react-native-reanimated/plugin"
]
}

0 comments on commit 150e28d

Please sign in to comment.