Skip to content

Commit

Permalink
babel-preset-react-app: add babel-plugin-relay
Browse files Browse the repository at this point in the history
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
  • Loading branch information
maletor committed May 23, 2017
1 parent 913689f commit 56d72ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/babel-preset-react-app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
'use strict';

const plugins = [
// Support for Relay modern.
require.resolve('babel-plugin-relay'),
// class { handleClick = () => { } }
require.resolve('babel-plugin-transform-class-properties'),
// The following two plugins use Object.assign directly, instead of Babel's
Expand Down
1 change: 1 addition & 0 deletions packages/babel-preset-react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
],
"dependencies": {
"babel-plugin-dynamic-import-node": "1.0.2",
"babel-plugin-relay": "1.0.1",
"babel-plugin-syntax-dynamic-import": "6.18.0",
"babel-plugin-transform-class-properties": "6.24.1",
"babel-plugin-transform-object-rest-spread": "6.23.0",
Expand Down

0 comments on commit 56d72ae

Please sign in to comment.