ForbesLindesay / redux-optimist

Optimistically apply actions that can be later commited or reverted.
MIT License
776 stars 39 forks source link

Added .babelrc to .npmignore #16

Closed julienvincent closed 7 years ago

julienvincent commented 8 years ago

The .babelrc was causing react-native builds to fail. Added to npmignore to prevent this clash.

Macil commented 8 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.

julienvincent commented 8 years ago

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.

julienvincent commented 8 years ago

Here is a screen shot of the react-native bale for your reference.

screen shot 2016-10-18 at 8 43 51 pm
julienvincent commented 7 years ago

ping

ForbesLindesay commented 7 years ago

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.