Skip to content

Commit

Permalink
Fix example app with Reanimated (#2251)
Browse files Browse the repository at this point in the history
## Description

This PR fixes the order of babel plugins and adds
`@babel/plugin-proposal-export-namespace-from` to make the new versions
of Reanimated work on web.

See
software-mansion/react-native-reanimated#3437
for more information.

## Test plan

Run example apps
  • Loading branch information
j-piasecki committed Oct 21, 2022
1 parent 49709ad commit ac46150
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion example/babel.config.js
@@ -1,8 +1,8 @@
module.exports = {
presets: ['babel-preset-expo'],
plugins: [
'react-native-reanimated/plugin',
'@babel/plugin-transform-modules-commonjs',
'react-native-reanimated/plugin',
[
'module-resolver',
{
Expand Down
3 changes: 2 additions & 1 deletion example/babel.config.web.js
@@ -1,8 +1,9 @@
module.exports = {
presets: ['babel-preset-expo'],
plugins: [
'react-native-reanimated/plugin',
'@babel/plugin-proposal-export-namespace-from',
'@babel/plugin-transform-modules-commonjs',
'react-native-reanimated/plugin',
[
'module-resolver',
{
Expand Down
1 change: 1 addition & 0 deletions example/package.json
Expand Up @@ -30,6 +30,7 @@
},
"devDependencies": {
"@babel/core": "^7.17.8",
"@babel/plugin-proposal-export-namespace-from": "^7.18.9",
"@babel/preset-env": "^7.1.6",
"@babel/runtime": "^7.12.5",
"@expo/webpack-config": "^0.12.52",
Expand Down
8 changes: 8 additions & 0 deletions example/yarn.lock
Expand Up @@ -1085,6 +1085,14 @@
"@babel/helper-plugin-utils" "^7.16.7"
"@babel/plugin-syntax-export-namespace-from" "^7.8.3"

"@babel/plugin-proposal-export-namespace-from@^7.18.9":
version "7.18.9"
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.9.tgz#5f7313ab348cdb19d590145f9247540e94761203"
integrity sha512-k1NtHyOMvlDDFeb9G5PhUXuGj8m/wiwojgQVEhJ/fsVsMCpLyOP4h0uGEjYJKrRI+EVPlb5Jk+Gt9P97lOGwtA==
dependencies:
"@babel/helper-plugin-utils" "^7.18.9"
"@babel/plugin-syntax-export-namespace-from" "^7.8.3"

"@babel/plugin-proposal-json-strings@^7.12.1":
version "7.12.1"
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.12.1.tgz#d45423b517714eedd5621a9dfdc03fa9f4eb241c"
Expand Down

0 comments on commit ac46150

Please sign in to comment.