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

add ESM and Export Map #702

Closed
satanTime opened this issue Jun 16, 2021 · 2 comments · Fixed by #704
Closed

add ESM and Export Map #702

satanTime opened this issue Jun 16, 2021 · 2 comments · Fixed by #704

Comments

@satanTime
Copy link
Member

satanTime added a commit to satanTime/ng-mocks that referenced this issue Jun 16, 2021
satanTime added a commit that referenced this issue Jun 16, 2021
fix(core): building cjs and mjs #702
@satanTime
Copy link
Member Author

v12.1.1 has been released and contains a fix for the issue. Feel free to reopen the issue or to submit a new one if you meet any problems.

@GerkinDev
Copy link

GerkinDev commented Sep 17, 2021

Hi there,

I was wondering what was the state if this issue. Recent releases only declares the type as commonjs and with only a main in cjs, esm build isn't exported at all.

In the meantime, I've successfully moved several of my libs with both ESM & CJS support, with auto-fallbacks, so maybe I could give a hand.

On one hand, jest does not support ESM very well: it works, but it needs some time to search, so I'm afraid offering this ability would cause more issues related to ESM specificities with jest, than offering a real improvement. I don't know for jasmine though. Moreover, since this lib is not intended to be built in the application, tree shaking compliance of ESM is not really necessary.
On the other hand, this would be future-proof, possibly helping with future perf improvements and stability of static imports, and eventually support Deno if Angular comes to a point where this is possible.

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

Successfully merging a pull request may close this issue.

2 participants