Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-inline-import-graphql-ast

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-inline-import-graphql-ast - npm Package Compare versions

Comparing version 2.1.1 to 2.1.2

6

CHANGELOG.md
# ChangeLog
## v2.1.2 (January 26, 2018)
### Maintenance
* Add "Known Issues" section to README.md
## v2.1.1 (January 25, 2018)

@@ -4,0 +10,0 @@

2

package.json
{
"name": "babel-plugin-inline-import-graphql-ast",
"version": "2.1.1",
"version": "2.1.2",
"description": "Babel plugin to make .gql/.graphql files importable",

@@ -5,0 +5,0 @@ "author": "Alexander Roberts <detrohutt@gmail.com>",

@@ -5,2 +5,12 @@ # Babel Inline Import GraphQL AST

## Known Issues
#### `Cannot read property 'type' of undefined` in file containing .gql/.graphql import
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.
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.
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.
## Known use cases

@@ -7,0 +17,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc