expo / ex-navigation

Route-centric navigation for React Native
997 stars 201 forks source link

Issue with babel 7 #512

Open Danjavia opened 6 years ago

Danjavia commented 6 years ago

Hi, I'm try to update my react-native app with expo to sdk 31, and after make changes and update to babel 7 it returns the following error

[12:43:29] /Users/danny/native/lqn-finder/node_modules/@expo/ex-navigation/src/ExNavigation.js: /Users/danny/native/lqn-finder/node_modules/@expo/ex-navigation/src/ExNavigation.js: Unexpected export specifier type
[12:43:29]   44 | export { default as NavigationReducer } from './ExNavigationReducer';
[12:43:29]   45 | 
[12:43:29] > 46 | export * as NavigationStyles from './ExNavigationStyles';
[12:43:29]      |        ^
[12:43:29]   47 | 
[12:43:29]   48 | export { createRouter } from './ExNavigationRouter';
[12:43:29]   49 | export {

Here is my .babelrc configuration

{
  "presets": ["babel-preset-expo", "module:metro-react-native-babel-preset", "module:react-native-dotenv"],
  "plugins": [
    "@babel/plugin-syntax-export-namespace-from",
    "@babel/plugin-syntax-dynamic-import",
    ["@babel/plugin-proposal-decorators", { "legacy": true }],
    ["module-resolver", {
      "root": [
        "./src"
      ],
      "alias": {
        "components": "./src/components",
        "screens": "./src/screens",
        "services": "./src/services",
        "assets": "./src/assets",
        "router": "./src/router",
        "hocs": "./src/hocs"
      }
    }]
  ]
}

SDK upgrade info

More info about the upgrade to expo SDK 31 is https://blog.expo.io/expo-sdk-v31-0-0-is-now-available-cad6d0463f49

Thank you!

rafaeluzzi commented 5 years ago

Having this same issue. @Danjavia Did you found a way to fix this?