-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Revert ESM exports #7602
Revert ESM exports #7602
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes me sad, but I understand the need. Anything to let 24 get out the door 😀
Will be revisited together with #7554
@SimenB it makes me sad that it makes you sad ;) |
Rollup is able to write default export to |
We use Babel, but we could use https://github.com/59naga/babel-plugin-add-module-exports. Rollup is used for the browser builds, though |
It can be used to bundle all package files too. It will probably speed up startup time which is quite long now. It takes around 3-4 seconds on my macbook air. Sometimes more. |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
This reverts #7548, which converted all exports to ESM. That change makes Jest more verbose to use for CommonJS users (requiring
.default
in most cases) and breaks the use of some of its packages (e.g.:jest-phabricator
) out of the box, while not providing much additional value. We should revisit this once ESM has settled in Node (and also implemented support for ESM in modules specified in the config).Test plan
Unit, integration and e2e tests have been updated as well.