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
using ts-jest causes error in @lingui/macro #1197
Comments
I was able to fix this issue by setting compilerOptions.jsx to "preserve". When this is set to a value like "jsx", Babel TypeScript appears to do JSX transformations before handing over control to plugins like macros. Lingui's macro operates on the AST that still contains JSX nodes. |
@caresx You Beauty ! Thanks heaps. Confirmed that it works for me in my other project too. |
For ones having this issue, I did manage to set up First, you need to change the Both actions could be done only for tests in the
Be prepared to fix some babel-related errors (like variable declarations being or not being hoisted, read here) after the setup changes. |
Describe the bug
Error is
To Reproduce
The text was updated successfully, but these errors were encountered: