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
  • Merge requests
  • !1052

Remove unnecessary transform plugins for object spread to work

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/valscion/re-disable-babel-destructuring into master Nov 17, 2016
  • Overview 10
  • Commits 2
  • Pipelines 0
  • Changes 2

Created by: valscion

The babel-plugin-transform-object-rest-spread v6.19.0 update made the other two plugins unnecessary as it contains the fixes done in https://github.com/babel/babel/pull/4755

https://github.com/babel/babel/blob/v6.19.0/CHANGELOG.md

Ref https://github.com/facebookincubator/create-react-app/issues/904#issuecomment-261077538 and #927

Test plan

1. Use node v6.7.0

If you use nvm, this is how:

nvm install v6.7.0
nvm use v6.7.0

2. (Optional, I think) Use npm v2

npm install -g [email protected]

3. Modify App.test.js

Modify packages/react-scripts/template/src/App.test.js to look like this:

import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';

it('renders without crashing', () => {
  const fn = ({ a, ...otherProps }) => otherProps;

  fn({ a: 1, b: 2 });

  console.log(fn({ a: 1, b: 2 }));

  const div = document.createElement('div');
  ReactDOM.render(<App />, div);
});

4. Install all the packages and run the test script

npm install
npm test
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/valscion/re-disable-babel-destructuring