Resolve regenerator runtime relative to react-scripts (#2175)

This commit is contained in:
Dan Abramov
2017-05-16 15:40:16 +01:00
committed by GitHub
parent 58689133a1
commit 50aaae6c1c
4 changed files with 22 additions and 6 deletions

View File

@@ -8,8 +8,6 @@
*/
'use strict';
var path = require('path');
const plugins = [
// class { handleClick = () => { } }
require.resolve('babel-plugin-transform-class-properties'),
@@ -36,8 +34,6 @@ const plugins = [
helpers: false,
polyfill: false,
regenerator: true,
// Resolve the Babel runtime relative to the config.
moduleName: path.dirname(require.resolve('babel-runtime/package')),
},
],
];

View File

@@ -22,7 +22,9 @@
"babel-plugin-transform-regenerator": "6.24.1",
"babel-plugin-transform-runtime": "6.23.0",
"babel-preset-env": "1.4.0",
"babel-preset-react": "6.24.1",
"babel-runtime": "6.23.0"
"babel-preset-react": "6.24.1"
},
"peerDependencies": {
"babel-runtime": "^6.23.0"
}
}