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

Allow Async Transforms #2711

Closed
joezimjs opened this issue Jan 26, 2017 · 4 comments
Closed

Allow Async Transforms #2711

joezimjs opened this issue Jan 26, 2017 · 4 comments

Comments

@joezimjs
Copy link

joezimjs commented Jan 26, 2017

I'd like to suggest a feature:
Currently, transform scripts (through the transform configuration) must be synchronous. However, there are some transformers out there that must run asynchronously that I'd like to use in my transform scripts, but until Jest supports asynchronous transforms, this isn't possible.

@cpojer
Copy link
Member

cpojer commented Jan 26, 2017

This is not possible, Jest transforms when a module is being required (like "require('Foo')") which has to be synchronous.

@cpojer cpojer closed this as completed Jan 26, 2017
@ryancat
Copy link

ryancat commented Oct 18, 2017

I have encountered this use case. Basically the test file needs to be compiled as it's written in coffeescript and using google closure library to require/provide dependencies. I managed to use transform with coffee module to compile the source code to javascript, but cannot use webpack to deal with google closure library as the compilation is asynchronous.

I need to either find a sync way to compile webpack, or to find a async way to transform the file.

@SimenB
Copy link
Member

SimenB commented Oct 21, 2017

#4725

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants