airbnb / react-with-styles

Use CSS-in-JavaScript with themes for React without being tightly coupled to one implementation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

.babelrc should be removed from npm

RanzQ opened this issue · comments

React Native packager doesn't find preset airbnb. Removing .babelrc fixes it.

reduxjs/redux-thunk#43

facebook/react-native#4062

Also applies to react-with-styles-interface-react-native.

No, it absolutely should not be - npm explore foo && npm install && npm test should always work. The RNP has a flaw in that it transpiles node_modules, and the proper place for a workaround is a postinstall script in your top-level app that removes all .babelrc files from your node_modules.

Ok, thanks for the tip. I thought .babelrc is unnecessary for a transpiled npm package. :)

No worries - untranspiled npm packages shouldn't exist; it's a flaw in the RN ecosystem that it's encouraged and allowed.

I also had the impression that untranspiled code would perform better if it's natively supported but that's not true. So I get your point that all packages should be transpiled and there shouldn't be a need for RN packager to touch node_modules.

Definitely not true - older syntax is almost always faster than newer syntax, because older syntax has had time to be optimized.