Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove module field from package.json #34

Merged
merged 1 commit into from
Mar 16, 2020
Merged

Remove module field from package.json #34

merged 1 commit into from
Mar 16, 2020

Conversation

NMinhNguyen
Copy link
Collaborator

@NMinhNguyen NMinhNguyen commented Mar 16, 2020

See facebook/react#18187 for context.

@gaearon has suggested via Twitter DM to stop publishing ESM until there's a better story around it.

@NMinhNguyen NMinhNguyen requested a review from gaearon March 16, 2020 19:46
package.json Outdated Show resolved Hide resolved
Copy link
Collaborator

@gaearon gaearon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While technically this is breaking, the usage is super low and is probably mostly React CI builds at this point. Also, there isn't much reason to ESM-import a shallow renderer these days. It's not likely to be used in Rollup setups. So I think this is fine to do now (but not later).

@NMinhNguyen NMinhNguyen changed the title Remove ESM build Remove module field from package.json Mar 16, 2020
@NMinhNguyen NMinhNguyen merged commit 16bacd7 into master Mar 16, 2020
@NMinhNguyen NMinhNguyen deleted the remove-esm branch March 16, 2020 23:33
@@ -3,7 +3,6 @@
"version": "16.13.0",
"description": "React package for shallow rendering.",
"main": "index.js",
"module": "esm/index.js",
Copy link
Member

@ljharb ljharb Mar 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this field is nonstandard anyways and shouldn't ever be used; ESM should be shipped via the "exports" field, since that's what all bundlers have to support already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants