just-jeb / angular-builders

Angular build facade extensions (Jest and custom webpack configuration)
MIT License
1.14k stars 198 forks source link

ESM modules #1226

Open grosch opened 2 years ago

grosch commented 2 years ago

With Angular 14 and jest-preset-angular 12 it's now possible to get pretty far along the ESM path. Will this be upgraded to give me an option to use that instead of the commonjs versions?

In the jest-preset-angular packages there's an examples/examples-v14 directory where you can see the versions of the files with the -esm path component in them.

just-jeb commented 2 years ago

Yes, the Jest builder will support ESM. However, it's not a small task so it will require some time.

grosch commented 1 year ago

@just-jeb Any ETA on when this might happen?

just-jeb commented 1 year ago

No specific ETA, sorry. The best ETA I can give is that it will be ready when I have time for it. A contribution is the best way to make it happen faster, so if you'd like to take a shot I'd love to provide guidance and assistance on this.

muuvmuuv commented 2 months ago

Hmm, any help you need here? Wondering if we can get this working easier now since Angular moves more and more to ESM configuration with verbatim modules.

muuvmuuv commented 2 months ago

Ok... just found out... using vitest is just... a no brainer :D had to switch just insane (didnt even needed to adjust any test spec). Copied most of the code from AnalogJS and use their manuall installation but it works super smooth. One just need to make sure to install the exact same vite version as @angular/build installs. (https://analogjs.org/docs/features/testing/vitest#setup-for-running-tests-for-node)