Closed julienvincent closed 7 years ago
See #14 and #12.
You should not be running babel in node_modules. If you do you will find that your build fails pretty frequently. You should only run babel on your own application code.
redux-optimist is published onto npm already compiled to ES5, so you shouldn't try to run it through babel again.
I am not running babel in node_modules. react-native
however scours the project for .babelrc and breaks when it finds redux-optimist's .babelrc
. This is not a process I have control over and is a simple matter to fix here.
Additionally there is no benefit to allowing the .babelrc to propagate into an npm publish and is generally bad practice to let dev config appear in production builds.
Here is a screen shot of the react-native
bale for your reference.
ping
No, babel should not be applied to node_modules. Doing so will produce other, more subtle bugs. As such, breaking users in such a clear/dramatic way when they have incorrect configs is a useful (if un-intended) feature. If you are unable to prevent babel transforms being run against your node_modules folder, you should either raise that issue with react-native or on stackoverflow.
The
.babelrc
was causingreact-native
builds to fail. Added to npmignore to prevent this clash.