You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Jest expects an exported transform's process function to return a string.
Please, allow it to return a Promise<string | { code: string }> | string | { code: string }.
Motivation
We live in a new era of asynchronous code and, unfortunately, it is not always possible to write synchronous transformations. For example, I implement a transform which uses postcss internally, which in turn is asynchronous all the way. Currently, I unable to use postcss as a dependency for transformations :-(
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.
🚀 Feature Proposal
Jest expects an exported transform's
process
function to return a string.Please, allow it to return a
Promise<string | { code: string }> | string | { code: string }
.Motivation
We live in a new era of asynchronous code and, unfortunately, it is not always possible to write synchronous transformations. For example, I implement a transform which uses postcss internally, which in turn is asynchronous all the way. Currently, I unable to use postcss as a dependency for transformations :-(
Example
Somewhere in a transform implementation:
The text was updated successfully, but these errors were encountered: