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

Support for loading transformers written in ESM #11

Closed
uhyo opened this issue Feb 18, 2024 · 3 comments
Closed

Support for loading transformers written in ESM #11

uhyo opened this issue Feb 18, 2024 · 3 comments

Comments

@uhyo
Copy link

uhyo commented Feb 18, 2024

Hello, thank you for the great tool! 🙂

Recently Jest supports loading transformers written in ESM through the requireOrImportModule util.

It would be great if jest-chain-transform could support such loaders too.

Downside is that this would require createTransformer function to be an async function, which is supported only by Jest >= 29.4, 😢

@anc95
Copy link
Owner

anc95 commented Feb 19, 2024

Noted. will look into this and try to support ESM loader

@anc95
Copy link
Owner

anc95 commented Feb 26, 2024

0.0.6 supports the ESM transformer to be chained.

Jest ESM is still under experiment. Please refer to https://jestjs.io/docs/ecmascript-modules.

An example

@uhyo
Copy link
Author

uhyo commented Feb 26, 2024

Thanks for the good news! 🎉 I'll check.

@anc95 anc95 closed this as completed Jun 11, 2024
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

No branches or pull requests

2 participants