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

feat(config): load zone ESM when running jest in ESM mode #892

Merged
merged 1 commit into from Mar 20, 2021
Merged

feat(config): load zone ESM when running jest in ESM mode #892

merged 1 commit into from Mar 20, 2021

Conversation

ahnpnl
Copy link
Collaborator

@ahnpnl ahnpnl commented Mar 19, 2021

Summary

Check --experimental-vm-modules in process.execArgv to see if user runs Jest in ESM mode or CommonJS mode to load the correct zone-testing file with:

  • zone.js/bundles/zone-testing-bundle.umd.js for CommonJS
  • zone.js/fesm2015/zone-testing-bundle.min.js for ESM

Closes #751

Test plan

Green CI

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

N.A.

@ahnpnl ahnpnl marked this pull request as ready for review March 20, 2021 09:30
@ahnpnl ahnpnl merged commit e03ec19 into thymikee:master Mar 20, 2021
@ahnpnl ahnpnl deleted the load-zone-esm branch March 20, 2021 09:30
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.

Jest ESM: Avoiding UMD imports
1 participant