Skip to content

Document the extent of ES6 polyfilling #969

Closed
@jhorneman

Description

@jhorneman

Assuming no major misunderstandings from my side: It was not clear me from the documentation that create-react-app installs fetch (whatwg-fetch), and that this is then available to me in my own JavaScript code. I only found this out when I looked at create-react-app (CRA)'s package.json file and tried it out.

I assume the presence of fetch and its use in user code is intended, but I cannot assume this is true for everything inside CRA's package.json file.

It seems to me there are three kinds of dependencies inside create-react-app:

  1. development dependencies, such as rimraf, which are needed for CRA's core functionality but not for any code running in the browser - the equivalent of installing with --save-development.
  2. dependencies that are implementation details and while they might be useful for my own code, are not guaranteed to stay in future versions of CRA.
  3. dependencies that I can use in my own code and that are guaranteed to stay, such as, presumably, fetch, until fetch is available natively in all major browsers.

It is hard to tell right now which dependency is which. It would be great to have this documented somewhere. I would propose something, but I lack the requisite knowledge.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions