You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a unique case with react-native projects where babel is customized and stripped for performance reasons - js-data's package.json babel config breaks the build.
Replicate this by creating a simple react-native project and including js-data:
react-native init DemoApp && cd DemoApp && npm i js-data@rc
Now, edit the index.ios.js or index.android.js file to include import { Container } from 'js-data' then save and run the simulater
react-native run-ios
You'll see an error babelHelpers.typeof is not a function this is because babel is stripped down and customized in react-native using preset "react-native". Now, to show how this can be fixed, remove or move the babel config in the node_modules/js-data/package.json file to .babelrc and restart the simulator with --reset-cache
react-native run-ios --reset-cache
And the error has gone away!
Any objections to moving these babel configs from package.json?
The text was updated successfully, but these errors were encountered:
In a unique case with react-native projects where babel is customized and stripped for performance reasons - js-data's package.json babel config breaks the build.
Replicate this by creating a simple react-native project and including js-data:
Now, edit the index.ios.js or index.android.js file to include
import { Container } from 'js-data'
then save and run the simulaterYou'll see an error
babelHelpers.typeof is not a function
this is because babel is stripped down and customized in react-native using preset "react-native". Now, to show how this can be fixed, remove or move the babel config in the node_modules/js-data/package.json file to .babelrc and restart the simulator with--reset-cache
And the error has gone away!
Any objections to moving these babel configs from package.json?
The text was updated successfully, but these errors were encountered: