🚀 Feature Proposal
From my point of view this is a regression, but I guess you had good reasons to bind the module type to the supportsStaticESM-option of Jest. That's why I'm proposing it as a feature: allow to have moduleKind be ESNext independent of Jest's supportsStaticESM-option.
Motivation
The custom Jest preset of the Node/React framework my team and I are maintaining relies on the fact, that the transpiled Typescript, ts-jest passes on to Babel, still contains ES Modules. Otherwise the custom Babel plugin that is part of the preset stops working.
So we rather need the useESM-option to override the supportsStaticESM-option. Then ESM can be enabled implicitly by providing the respective environment to Jest. Or explicitly by setting useESM to true. And vice versa, ESM could be disabled while the environment indicates the opposite to Jest — whoever might need this.
What do you think?
🚀 Feature Proposal
From my point of view this is a regression, but I guess you had good reasons to bind the module type to the
supportsStaticESM-option of Jest. That's why I'm proposing it as a feature: allow to havemoduleKindbeESNextindependent of Jest'ssupportsStaticESM-option.Motivation
The custom Jest preset of the Node/React framework my team and I are maintaining relies on the fact, that the transpiled Typescript,
ts-jestpasses on to Babel, still contains ES Modules. Otherwise the custom Babel plugin that is part of the preset stops working.So we rather need the
useESM-option to override thesupportsStaticESM-option. Then ESM can be enabled implicitly by providing the respective environment to Jest. Or explicitly by settinguseESMtotrue. And vice versa, ESM could be disabled while the environment indicates the opposite to Jest — whoever might need this.What do you think?