This is incredibly hard to troubleshoot, but it goes something like this:
project/node_modules/polydev/src/middleware/router/handle.production.js attempts to require("project/example/routes/login/index.ts")
Jest does a bunch of resolution stuff, and ends up loading project/index.js.
Just incorrectly stores the module key as user:project/node_modules/polydev/src/middleware/router/handle.production.js:, because it can't resolve the absolute path or mock module location/meta.
This is incredibly hard to troubleshoot, but it goes something like this:
project/node_modules/polydev/src/middleware/router/handle.production.js
attempts torequire("project/example/routes/login/index.ts")
project/index.js
.user:project/node_modules/polydev/src/middleware/router/handle.production.js:
, because it can't resolve the absolute path or mock module location/meta.