Skip to content

Commit ceaef26

Browse files
authored
Merge pull request #10 from stushurik/feature/migrate-to-customize-cra
migrate to customize-cra
2 parents f415735 + d8a0dee commit ceaef26

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
const { injectBabelPlugin } = require('react-app-rewired')
1+
const { addBabelPlugin } = require('customize-cra');
22

33
function rewireInlineImportGraphqlAst(config, env, gqlPluginOptions = {}) {
44
const pluginOptions = Object.assign({}, gqlPluginOptions, { nodePath: process.env.NODE_PATH })
5-
return injectBabelPlugin(['import-graphql', pluginOptions], config)
5+
return addBabelPlugin(['import-graphql', pluginOptions])(config)
66
}
77

8-
module.exports = rewireInlineImportGraphqlAst
8+
module.exports = rewireInlineImportGraphqlAst

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-app-rewire-inline-import-graphql-ast",
3-
"version": "1.1.1",
3+
"version": "2.0.0",
44
"description": "A plugin to add the inline-import-graphql-ast Babel plugin to create-react-app with react-app-rewired",
55
"repository": {
66
"type": "git",
@@ -9,9 +9,10 @@
99
"main": "index.js",
1010
"license": "MIT",
1111
"dependencies": {
12-
"babel-plugin-import-graphql": "^2.6.2"
12+
"babel-plugin-import-graphql": "^2.6.2",
13+
"customize-cra": "^0.2.12"
1314
},
1415
"peerDependencies": {
15-
"react-app-rewired": "^1.3.8"
16+
"react-app-rewired": "^2.0.1"
1617
}
1718
}

0 commit comments

Comments
 (0)