Comments (4)
Hi @gwmccull ,
It's good point. As React Native applies Babel to node_modules
I think the best solution is to put separate .babelrc
into app directory:
{
"plugins": [
"babel-plugin-runtyper"
]
}
In that case runtyper will be applied only to application files.
I think I should add this to readme.
Please let me know is it works for you.
from babel-plugin-runtyper.
@vitalets yes, that worked.
If anyone else needs to do this, you'll need to copy the .babelrc
file from your root, create a 2nd .babelrc
file in /app/
and add the babel-plugin-runtyper
to this 2nd file.
The new /app/.babelrc
file will substitute for the original; it does not add to the original.
from babel-plugin-runtyper.
Hmm.. it's interesting. Did not notice this, thanks.
I will investigate as duplicating .babelrc
looks not pretty to me.
But I see several issues related to such behavior in RN collected here:
facebook/react-native#7821
from babel-plugin-runtyper.
@gwmccull what version of RN are you using?
I've tested on 0.44 and nested .babelrc
files are merged.
But I found that such behavior was removed in favor of extends
property. Could you try this:
{
"extends": "../.babelrc",
"plugins": [
"babel-plugin-runtyper"
]
}
PS: when checking I re-run packager every time with --reset-cache
option to clear cache.
from babel-plugin-runtyper.
Related Issues (12)
- Readme images HOT 1
- Date arithmetics HOT 4
- Add an option to disable the warning about using the plugin in production HOT 2
- Make it work with Babel 7 HOT 1
- Check for NaN in all assertions
- Support unary operators
- When compare objects split to Arrays, Date, etc HOT 1
- Uncaught ReferenceError: global is not defined HOT 2
- Guess variable type by it's name and check in assignment HOT 1
- implicitCompareNull and implicitCompareUndefined options do not work HOT 2
- Ignore different non-custom types in === HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from babel-plugin-runtyper.