Skip to content

Commit

Permalink
Merge pull request #23 from zackify/master
Browse files Browse the repository at this point in the history
Extract Babel config from package.json, fixes #19.
  • Loading branch information
jaydenseric committed Jun 24, 2017
2 parents ccbc50d + b27583c commit efcdcd3
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 26 deletions.
20 changes: 20 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"presets": [
[
"env",
{
"targets": {
"browsers": [
"> 2%"
]
},
"modules": false,
"loose": true
}
],
"stage-0"
],
"plugins": [
"transform-runtime"
]
}
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# apollo-upload-client change log

## next

- Simplified React Native setup by moving Babel config out of `package.json`, fixing [#19](https://github.com/jaydenseric/apollo-upload-client/issues/19) via [#23](https://github.com/jaydenseric/apollo-upload-client/pull/23).

## 4.1.1

- Updated dependencies.
Expand Down
20 changes: 0 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,26 +51,6 @@
"src",
"dist"
],
"babel": {
"presets": [
[
"env",
{
"targets": {
"browsers": [
"> 2%"
]
},
"modules": false,
"loose": true
}
],
"stage-0"
],
"plugins": [
"transform-runtime"
]
},
"eslintConfig": {
"parser": "babel-eslint",
"parserOptions": {
Expand Down
6 changes: 0 additions & 6 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ Install with [npm](https://npmjs.com):
npm install apollo-upload-client
```

React Native installs packages without their dev dependencies and [unconventionally](https://github.com/facebook/react-native/issues/10966) Babel is run over `node_modules`. Babel errors when it tries to respect config found in this package with presets and plugins absent. To overcome this install these dev dependencies (at versions matching `package.json`):

```
npm install --save-dev babel-preset-env babel-preset-stage-0 babel-plugin-transform-runtime
```

Setup Apollo client with a special network interface:

```js
Expand Down

0 comments on commit efcdcd3

Please sign in to comment.