Skip to content

Commit 9755242

Browse files
committed
Added relay
1 parent b844e4e commit 9755242

File tree

6 files changed

+5842
-4
lines changed

6 files changed

+5842
-4
lines changed

packages/react-scripts/config/webpack.config.dev.js

+1
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ module.exports = {
144144
// @remove-on-eject-begin
145145
babelrc: false,
146146
presets: [require.resolve('babel-preset-react-app')],
147+
plugins: [require.resolve('../scripts/plugins/babelRelayPlugin')],
147148
// @remove-on-eject-end
148149
// This is a feature of `babel-loader` for webpack (not Babel itself).
149150
// It enables caching results in ./node_modules/.cache/babel-loader/

packages/react-scripts/config/webpack.config.prod.js

+1
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ module.exports = {
150150
query: {
151151
babelrc: false,
152152
presets: [require.resolve('babel-preset-react-app')],
153+
plugins: [require.resolve('../scripts/plugins/babelRelayPlugin')],
153154
},
154155
// @remove-on-eject-end
155156
},

packages/react-scripts/package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"name": "react-scripts",
3-
"version": "0.8.1",
2+
"name": "@cliedeman/react-scripts",
3+
"version": "0.0.3",
44
"description": "Configuration and scripts for Create React App.",
5-
"repository": "facebookincubator/create-react-app",
5+
"repository": "cliedeman/create-react-app",
66
"license": "BSD-3-Clause",
77
"engines": {
88
"node": ">=4"
@@ -29,6 +29,7 @@
2929
"babel-jest": "17.0.2",
3030
"babel-loader": "6.2.7",
3131
"babel-preset-react-app": "^2.0.0",
32+
"babel-relay-plugin": "0.9.3",
3233
"case-sensitive-paths-webpack-plugin": "1.1.4",
3334
"chalk": "1.1.3",
3435
"connect-history-api-fallback": "1.3.0",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
const getBabelRelayPlugin = require('babel-relay-plugin');
2+
const schema = require('../../../../../graphql/schema.json');
3+
4+
module.exports = getBabelRelayPlugin(schema.data);

0 commit comments

Comments
 (0)