diff --git a/packages/babel-preset-react-app/index.js b/packages/babel-preset-react-app/index.js index c8f20dde61d..e4eba34bbe0 100644 --- a/packages/babel-preset-react-app/index.js +++ b/packages/babel-preset-react-app/index.js @@ -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 diff --git a/packages/babel-preset-react-app/package.json b/packages/babel-preset-react-app/package.json index 175b7b1297f..af0d95d85a9 100644 --- a/packages/babel-preset-react-app/package.json +++ b/packages/babel-preset-react-app/package.json @@ -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",