Skip to content

Commit

Permalink
Enable generators
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon committed Jul 27, 2016
1 parent 88363b1 commit 2f68781
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
9 changes: 7 additions & 2 deletions config/babel.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*/

module.exports = {
babelrc: false,
cacheDirectory: true,
presets: [
'babel-preset-es2015',
Expand All @@ -18,6 +19,10 @@ module.exports = {
'babel-plugin-syntax-trailing-function-commas',
'babel-plugin-transform-class-properties',
'babel-plugin-transform-object-rest-spread'
].map(require.resolve),
babelrc: false
].map(require.resolve).concat([
[require.resolve('babel-plugin-transform-runtime'), {
regenerator: true,
polyfill: false
}]
])
};
11 changes: 8 additions & 3 deletions config/babel.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*/

module.exports = {
babelrc: false,
presets: [
'babel-preset-es2015',
'babel-preset-es2016',
Expand All @@ -17,7 +18,11 @@ module.exports = {
'babel-plugin-syntax-trailing-function-commas',
'babel-plugin-transform-class-properties',
'babel-plugin-transform-object-rest-spread',
'babel-plugin-transform-react-constant-elements'
].map(require.resolve),
babelrc: false
'babel-plugin-transform-react-constant-elements',
].map(require.resolve).concat([
[require.resolve('babel-plugin-transform-runtime'), {
regenerator: true,
polyfill: false
}]
])
};
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@
"babel-plugin-transform-class-properties": "6.10.2",
"babel-plugin-transform-object-rest-spread": "6.8.0",
"babel-plugin-transform-react-constant-elements": "6.9.1",
"babel-plugin-transform-runtime": "6.9.0",
"babel-preset-es2015": "6.9.0",
"babel-preset-es2016": "6.11.3",
"babel-preset-react": "6.11.1",
"babel-runtime": "6.11.6",
"chalk": "1.1.3",
"cross-spawn": "4.0.0",
"css-loader": "0.23.1",
Expand Down

0 comments on commit 2f68781

Please sign in to comment.