Unnecessary extra using `@babel/plugin-proposal-object-rest-spread`
Created by: alexander-akait
Is this a bug report?
Unnecessary extra using @babel/plugin-proposal-object-rest-spread
https://github.com/facebook/create-react-app/blob/master/packages/babel-preset-react-app/create.js#L113. In stable babel@7
release this problem was fixed. You can test with reproducible example below.
Did you try recovering your dependencies?
not required
Which terms did you search for in User Guide?
not required
Environment
no matter
(paste the output of the command here)
Steps to Reproduce
not required
Expected Behavior
Don't use unnecessary extra plugin
Actual Behavior
We are using this plugin.
Reproducible Demo
console.log(
require('@babel/core').transform(
`
const { ...rest1 } = {};
const [{ ...rest2 }] = [{}];
`,
{
plugins: ['@babel/plugin-proposal-object-rest-spread']
}
).code
)