babel-plugin-module-resolver aliases + jest watch bug
See original GitHub issueHere is the demo repo: https://github.com/cloud-walker/jest-module-resolver-bug steps to reproduce the bug are listed in the readme file.
What is the current behavior?
jest --watch -o
will ignore deps imported using babel-plugin-module-resolver
What is the expected behavior?
I’m not sure if its possible, maybe I have to use the moduleNameMapper
trick to make it work instead, but maybe it could work, so I’m notifying it.
Issue Analytics
- State:
- Created 6 years ago
- Comments:8
Top Results From Across the Web
vue.js - babel-plugin-module-resolver doesnt work with jest
i add moduleNameMapper to jest config, but he work only when i remove babel-plugin-module-resolver and add alias in webpack.
Read more >babel-plugin-module-resolver | Yarn - Package Manager
This plugin allows you to add new "root" directories that contain your modules. It also allows you to setup a custom alias for...
Read more >babel-plugin-module-alias - Bountysource
Rewrite/Resolve require/import paths to different values in Babel. Become a Bounty Hunter
Read more >babel-plugin-module-resolver - NPM Package Overview - Socket
Start using Socket to analyze babel-plugin-module-resolver and its 5 ... to setup a custom alias for directories, specific files, or even other npm...
Read more >avajs/ava - Gitter
How is it possible to see console.log output from inside the function that is being tested ... Thank a lot! babel-plugin-module-resolver resolve my...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Jest will not make assumptions on aliases based on the babel plugins you use. You’ll need to tell Jest how to resolve these absolute aliases using
moduleNameMapper
:You’ll also need to remove empty
jest.config.js
because Jest prioritizes it over package.jsonwhy is this closed? I’m facing the same issue. It makes much more intuitive sense for alias configuration to be inherited from babel config when babel-jest is used