Skip to content

Commit 56d72ae

Browse files
committed
babel-preset-react-app: add babel-plugin-relay
Adds support for Relay Modern. relay-compiler, relay-runtime, and react-relay are all "peer" dependencies, including the script to run relay compiler. This at least unblocks CRA from being able to develop Relay Modern. https://facebook.github.io/relay/docs/babel-plugin-relay.html https://facebook.github.io/relay/docs/relay-compiler.html
1 parent 913689f commit 56d72ae

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

packages/babel-preset-react-app/index.js

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
'use strict';
1010

1111
const plugins = [
12+
// Support for Relay modern.
13+
require.resolve('babel-plugin-relay'),
1214
// class { handleClick = () => { } }
1315
require.resolve('babel-plugin-transform-class-properties'),
1416
// The following two plugins use Object.assign directly, instead of Babel's

packages/babel-preset-react-app/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
],
1313
"dependencies": {
1414
"babel-plugin-dynamic-import-node": "1.0.2",
15+
"babel-plugin-relay": "1.0.1",
1516
"babel-plugin-syntax-dynamic-import": "6.18.0",
1617
"babel-plugin-transform-class-properties": "6.24.1",
1718
"babel-plugin-transform-object-rest-spread": "6.23.0",

0 commit comments

Comments
 (0)