I am looking to be able to use webpack aliases to resolve imports when using jest, and optimally, reference the webpack.aliases to avoid duplication.
webpack.aliases
Je
This is a real insanity but when I try to map module in package.json like this:
"jest": { "moduleNameMapper": { '@root/(.*)': '/../$1' } }
It doesn't work.
But when I do the same in jest.config.js it works:
jest.config.js
module.exports = { moduleNameMapper: { '@root/(.*)': '/../$1' } }