jest-chain-transform icon indicating copy to clipboard operation
jest-chain-transform copied to clipboard

Support for loading transformers written in ESM

Open uhyo opened this issue 1 year ago • 3 comments

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, 😢

uhyo avatar Feb 18 '24 06:02 uhyo

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

anc95 avatar Feb 19 '24 09:02 anc95

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

anc95 avatar Feb 26 '24 10:02 anc95

Thanks for the good news! :tada: I'll check.

uhyo avatar Feb 26 '24 11:02 uhyo