@@ -98,13 +98,36 @@ module.exports = function (webpackConfig, isDevelopment) {
98
98
};
99
99
```
100
100
related issues: [ #107 ] [ 107 ] , [ #167 ] [ 167 ] , [ #214 ] [ 214 ] , [ #309 ] [ 309 ] , [ #411 ] [ 411 ] , [ #1357 ] [ 1357 ]
101
+
102
+ ### Relay support
103
+ - install ` babel-relay-plugin ` :
104
+ ```
105
+ npm install --save-dev babel-relay-plugin
106
+ ```
107
+ - add ` relayPlugin.js ` file:
108
+ ``` js
109
+ const getBabelRelayPlugin = require (' babel-relay-plugin' );
110
+ const schemaData = require (' ./graphql.schema.json' );
111
+ const relayPlugin = getBabelRelayPlugin (schemaData .data );
112
+ module .exports = relayPlugin;
113
+ ```
114
+ - edit ` webpack.monkey.js ` like this:
115
+ ``` js
116
+ /* copy findLoader, addBabelPlugins from decorator example */
117
+ module .exports = function (webpackConfig , isDevelopment ) {
118
+ addBabelPlugins (webpackConfig, [
119
+ require .resolve (' ./relayPlugin.js' )
120
+ ]);
121
+ };
122
+ ```
123
+ related issues: [ #462 ] [ 462 ] , [ #662 ] [ 662 ] , [ #900 ] [ 900 ]
101
124
## TODOs
102
125
- [ ] add helpers
103
126
- [ ] customize test runner (jest)
104
127
- [ ] add more example
105
128
- [ ] scss support
106
129
- [x] decorator support
107
- - [ ] relay support
130
+ - [x ] relay support
108
131
109
132
## Thanks
110
133
@svrcekmichal for [ configurable-react-scripts] [ configurable-react-scripts ]
@@ -119,3 +142,7 @@ related issues: [#107][107], [#167][167], [#214][214], [#309][309], [#411][411],
119
142
[ 309 ] : https://github.com/facebookincubator/create-react-app/issues/309
120
143
[ 411 ] : https://github.com/facebookincubator/create-react-app/issues/411
121
144
[ 1357 ] : https://github.com/facebookincubator/create-react-app/issues/1357
145
+
146
+ [ 462 ] : https://github.com/facebookincubator/create-react-app/issues/462
147
+ [ 662 ] : https://github.com/facebookincubator/create-react-app/pull/662
148
+ [ 900 ] : https://github.com/facebookincubator/create-react-app/issues/900
0 commit comments