Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion config/babel.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ module.exports = {
],
plugins: [
require.resolve('babel-plugin-syntax-trailing-function-commas'),
require.resolve('babel-plugin-transform-async-to-generator'),
require.resolve('babel-plugin-syntax-async-functions'),
require.resolve('babel-plugin-transform-class-properties'),
require.resolve('babel-plugin-transform-object-rest-spread'),
require.resolve('babel-plugin-transform-regenerator'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn’t -regenerator already a part of es2015?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is, but in preset-es2015 it's passed different options, { async: false, asyncGenerators: false }. The default options (used here) are:

{
  asyncGenerators: true,
  generators: true,
  async: true
}

(Note that asyncGenerators is true by default, but since we don't enable the async generator syntax plugin, this doesn't matter.)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, so that’s how it works.

[require.resolve('babel-plugin-transform-runtime'), {
helpers: false,
polyfill: false,
Expand Down
3 changes: 2 additions & 1 deletion config/babel.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ module.exports = {
],
plugins: [
require.resolve('babel-plugin-syntax-trailing-function-commas'),
require.resolve('babel-plugin-transform-async-to-generator'),
require.resolve('babel-plugin-syntax-async-functions'),
require.resolve('babel-plugin-transform-class-properties'),
require.resolve('babel-plugin-transform-object-rest-spread'),
require.resolve('babel-plugin-transform-react-constant-elements'),
require.resolve('babel-plugin-transform-regenerator'),
[require.resolve('babel-plugin-transform-runtime'), {
helpers: false,
polyfill: false,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"babel-eslint": "6.1.2",
"babel-jest": "14.1.0",
"babel-loader": "6.2.4",
"babel-plugin-syntax-async-functions": "^6.8.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove carets from deps

"babel-plugin-syntax-trailing-function-commas": "6.8.0",
"babel-plugin-transform-async-to-generator": "6.8.0",
"babel-plugin-transform-class-properties": "6.11.5",
"babel-plugin-transform-object-rest-spread": "6.8.0",
"babel-plugin-transform-react-constant-elements": "6.9.1",
Expand Down