Skip to content

Commit 55ab43e

Browse files
committed
Update babel-plugin-import-graphql version, CHANGELOG, and README
1 parent ceaef26 commit 55ab43e

File tree

3 files changed

+18
-9
lines changed

3 files changed

+18
-9
lines changed

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# ChangeLog
22

3+
## v2.0.1 (March 21, 2019)
4+
5+
### Maintenance
6+
7+
- Update minimum version of babel-plugin-import-graphql to v2.7.0
8+
- Update CHANGELOG to add missing entry for v2.0.0
9+
- Update README to remove old known issue that only affects [email protected]
10+
11+
## v2.0.0 (March 21, 2019)
12+
13+
### Breaking
14+
15+
- Version 2.x of this package is for use with version 2.x of react-app-rewired (Thanks @stushurik)
16+
317
## v1.1.1 (July 9, 2018)
418

519
### Fixes

README.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,10 @@
44

55
Add [`babel-plugin-import-graphql`](https://github.com/detrohutt/babel-plugin-import-graphql) to your create-react-app app via [`react-app-rewired`](https://github.com/timarney/react-app-rewired)
66

7-
## Known Issues
7+
## Versions
88

9-
#### `Cannot read property 'type' of undefined` in file containing .gql/.graphql import
10-
11-
I'm putting this right at the top because if you use this package to any real degree you'll almost certainly experience this error at some point and it can be hard to track down if you don't know what it is. This is caused by a bug in Babel 6 (Which create-react-app 1.x uses).
12-
13-
A PR has been submitted to Babel [here](https://github.com/babel/babel/pull/7205) and hopefully they'll merge it and make a patch release soon.
14-
15-
In the meantime, there's an easy, although annoying, workaround. Just change the content of the file throwing the error in any way. The easiest and most reliable change I've found is to simply add an empty comment `//` on it's own line when this error occurs. As the file gets updated over time, you can later remove the empty comment. I usually only have 1 or 2 of these in my project at any given time.
9+
For [email protected] use v2.x of this package.
10+
For [email protected] use v1.x of this package.
1611

1712
## Installation
1813

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"main": "index.js",
1010
"license": "MIT",
1111
"dependencies": {
12-
"babel-plugin-import-graphql": "^2.6.2",
12+
"babel-plugin-import-graphql": "^2.7.0",
1313
"customize-cra": "^0.2.12"
1414
},
1515
"peerDependencies": {

0 commit comments

Comments
 (0)