Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Issues
  • #5310
Closed
Open
Issue created Oct 05, 2018 by Administrator@rootContributor

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
)
Assignee
Assign to
Time tracking