-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Plan for multiple module systems #381
Comments
+1. This is a huge pain currently. |
Here's a workaround which can resolve webpack paths in the preprocess phase: https://www.npmjs.com/package/jest-webpack-alias |
I'm going to start rewriting the haste module loader soon and want to support third-party module loaders as outlined in this plan above. @iamdustan let me if there is anything I can do to support you better with the new functionality. Is adding a config for a different module loader enough for you? |
There is a |
Sooooo I’m on to a different company and not using Jest anymore. |
What, you accepted a new job and didn't check with me first? |
Weeeelllll buy me a house in a London suburb and I'll come work with you kind of sort of. (Not moving to California) 😇 |
Will the HasteModuleLoader rewrite fix the issue that it doesn't currently seem to understand how nodejs finds modules? If, for example, there are multiple files called In my case, this is a problem because I have |
So there are two issues here:
The react-native-packager resolver we're gonna base this off will solve these two issues by:
|
@cpojer I use babel-jest, but the module with ES6 syntax is an external dependency. Furthermore, the file with ES6 syntax is not even used by the dependent library itself, it's just non-precompiled source that is shipped for reference. @amasad I'm very happy to hear that I'm not the only one having this problem and that it's being fixed 👍 |
you can still transform this file, you might have to update some configs but you can compile node_modules if you want. |
This work was completed in #599. Yay! |
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. |
We’re getting ready to start a few projects where I would like to use jest heavily. The inability to hijack the module resolution calls is a bit prohibitive at the moment though. I would like to propose a simple plan to open up jest to module systems besides Haste.
jest-haste
jest-webpack
,jest-requirejs
, etc)Is there anything I’m completely neglecting or unaware of in this plan?
The text was updated successfully, but these errors were encountered: