Skip to content
Merged
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
Prev Previous commit
Add more descriptive comment explaining plugin use
  • Loading branch information
JeffreyATW committed Oct 18, 2016
commit 29711b820f393aff0d8e536cb38c77d558b2249a
5 changes: 5 additions & 0 deletions packages/babel-preset-react-app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,13 @@ const plugins = [
// Resolve the Babel runtime relative to the config.
moduleName: path.dirname(require.resolve('babel-runtime/package'))
}],
// The following two plugins are currently necessary to get
// babel-preset-env to work with rest/spread. More info here:
// https://github.com/babel/babel-preset-env#caveats
// https://github.com/babel/babel/issues/4074
// const { a, ...z } = obj;
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's add a note here specifically mentioning why we need them, and link to the issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

require.resolve('babel-plugin-transform-es2015-destructuring'),
// const fn = ({ a, ...otherProps }) => otherProps;
require.resolve('babel-plugin-transform-es2015-parameters')
];

Expand Down