Skip to content

Feature request: Add a "module" entry in package.json to export ES2015 version of React #10021

Open
@misterfresh

Description

@misterfresh

Do you want to request a feature or report a bug?
Request a feature

What is the current behavior?
React ecosystem was promoting ES6 classes and modules since 2014 and many packages like react-router, redux and so on, have an "es" folder in the npm package with source code in ES2015 modules. Unless I am missing something, it is strange that React itself does not offer that option.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net or similar (template: https://jsfiddle.net/84v837e9/).
Install react and try to import it in a browser with native modules enabled.

What is the expected behavior?
Have an "es" folder in the npm package with ES2015 modules source code, like most React ecosystem projects do. Allow to import react from ES2015 native modules to make developer workflow more simple.

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
All versions

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