-
Notifications
You must be signed in to change notification settings - Fork 9
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
Import fails with Jest 28 #249
Comments
Still don't understand why not release 2.0.0 of jest-raw-loader, as copying own |
Just for people looking for the solution, @glensc made a forked release: https://github.com/glensc/jest-raw-loader Thank you ;) (still, no reason to blame @keplersj if he has no more time on it) |
we can create a custom fileTransfomer and use it
|
Thanks, that seems to be working for our project. But why not use the simpler syntax suggested by @korompaiistvan ?
|
It seems Jest 28 introduced a breaking change that renders this module unusable with that jest version.
Trying to import a string from a text file gives the following error:
The problem is solved if I patch the contents of node_modules/jest/index.js from:
To:
I think this change would be backwards compatible with earlier version of jest until at least v21 but I did not test this in detail, only looked at the type definitions from the v21.0 release.
May I submit a pull request for this change?
The text was updated successfully, but these errors were encountered: