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
  • #398
Closed
Open
Issue created Aug 08, 2016 by Administrator@rootContributor

Object.assign et al are not polyfilled

Created by: conatus

Hi all,

Thanks for your wonderful work on this.

When testing a React app using create-react-app on a old version of mobile Safari I noticed that Object.assign was failing.

I looked and saw that polyfill support is turned off on the configuration of babel-plugin-transform-runtime https://github.com/facebookincubator/create-react-app/blob/master/config/babel.prod.js#L33-L37

I worked around this by, for the moment, slightly inefficiently manually adding babel-polyfill and using the more "traditional" import 'babel-polyfill'; at the root of the application to include core-js polyfills.

Seems that if the goal is zero configuration setup this is going to be a gotcha for more than a few folks. Unsure if the best approach is to simply turn on the polyfill in babel-plugin-transform-runtime as the documentation seems to suggest this is not the intent of this transformation to supplement native methods like Object.assign.

Assignee
Assign to
Time tracking