I'm using mobx & decorators.
The project runs fine in the simulator via "npm run ios" and it also builds in Xcode without errors.
When I try to create an archive it fails with:
"SyntaxError in /mobx-stores/UserStore.js: Method has decorators, put the decorator plugin before the classes one."
Here's my bable.rc:
{
"presets": [
"babel-preset-react-native-stage-0/decorator-support",
"react-native"],
"env": {
"development": {
"plugins": [
"transform-react-jsx-source",
"transform-decoratorslegacy"
]
}
}
}
Versions in package.json:
- "react": "16.2.0",
- "react-native": "0.52.0",
- "mobx": "^4.0.1",
- "babel-preset-react-native-stage-0": "^1.0.1",
- "babel-preset-react-native-stage-0": "^1.0.1",
I've tried many work arounds without success.
Bottom line: Is it possible (or advisable) to use decorators in a react-native project used with Xcode?
Any info would be much appreciated!