Skip to content

Reconsider bundled polyfills #3343

Closed
Closed

Description

@gaearon

See my comment in #3200 (comment). We should remove any polyfills that are only necessary for browsers that aren't supported out of the box by React 16 anyway. We should also document the most efficient way polyfill for the lowest possible supported browsers by React 16 (AFAIK IE9). This would be a breaking change.

Activity

  1. added this to the milestone on Oct 29, 2017
  2. viankakrisna commented on Jan 16, 2018

    @viankakrisna
    Contributor

    with the recent changes regarding to babel and browserslist, do we still need to include this file? https://github.com/facebookincubator/create-react-app/blob/next/packages/react-scripts/config/polyfills.js

  3. andriijas commented on Jan 18, 2018

    @andriijas
    Contributor

    @Timer im testing the upcoming react-scripts 2.0 release on my app, if i set last 1 chrome versions in browserlist i dont expect the pollyfills to be bundled, just wanted to check if this issue is till under consideration for 2.0 - thanks

  4. Timer commented on Jan 18, 2018

    @Timer
    Contributor

    We'll probably do away with the fetch and promise polyfill.

  5. jpeg729 commented on Apr 10, 2018

    @jpeg729

    I would love to see two js bundles being produced, one to be served via <script type="module" src="modern.js"> and one to be served via <script nomodule src="legacy.js">.

    Justification

    • Pushing large bundles to evergreen browsers is wasteful. If they support type="module" then they need much less polyfilling.
    • Firefox will very soon support type="module".
    • Safari 10.1 downloads and runs both bundles, but safari 10.1 is dying out and a tiny bit of boilerplate can prevent both bundles from running.
    • IE<=11 may download both bundles, but only runs the legacy one. That said, IE<=11 is mostly used on desktop computers with good internet connections, so the dual download isn't a huge issue.
    • Mobile browsers that download both bundles are also dying out.
  6. Timer commented on Sep 26, 2018

    @Timer
    Contributor

    We're dropping IE 11 support with v2. See more instructions in the migration section when released.

  7. locked and limited conversation to collaborators on Jan 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions