https://github.com/detrohutt/react-app-rewire-inline-import-graphql-ast
Add the inline-import-graphql-ast Babel plugin to your create-react-app app via react-app-rewired
https://github.com/detrohutt/react-app-rewire-inline-import-graphql-ast
Last synced: about 2 months ago
JSON representation
Add the inline-import-graphql-ast Babel plugin to your create-react-app app via react-app-rewired
- Host: GitHub
- URL: https://github.com/detrohutt/react-app-rewire-inline-import-graphql-ast
- Owner: detrohutt
- License: mit
- Created: 2017-12-15T17:20:30.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-21T12:15:34.000Z (about 6 years ago)
- Last Synced: 2024-04-25T04:44:42.560Z (about 1 year ago)
- Language: JavaScript
- Size: 16.6 KB
- Stars: 17
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3AYURHRU7PMCL)
# react-app-rewire-inline-import-graphql-ast
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)
## Versions
For [email protected] use v2.x of this package.
For [email protected] use v1.x of this package.## Installation
```sh
npm install --save react-app-rewire-inline-import-graphql-ast
# alternatively if you have yarn installed
yarn add react-app-rewire-inline-import-graphql-ast
```## Usage
In the `config-overrides.js` you created for `react-app-rewired` add this code:
```JS
/* config-overrides.js */const rewireInlineImportGraphqlAst = require('react-app-rewire-inline-import-graphql-ast');
module.exports = function override(config, env) {
config = rewireInlineImportGraphqlAst(config, env);
return config;
}
```## Credits
This repo borrows heavily from [`react-app-rewire-styled-components`](https://github.com/withspectrum/react-app-rewire-styled-components) by @withspectrum