I'm currently working on a project that is a Typescript Monorepo.
The folder structure looks something like this:
Clients
├- tsconfig.json
└- Packages
├- Core
| ├- tsconfig.json
| ├-┬ src
| | └- MyModule.ts
| └-┬ dist
| ├- MyModule.js
| └- MyModule.d.ts
└┬ Web
├- tsconfig.json
└-┬ src
└- WebComponent.tsx
core/src contains my module where core/dist contains my build.
When I auto-import a module on web/src/WebComponent.tsx it auto-imports as @myApp/dist/MyModule instead of @myApp/src/MyModule.
This is what my TSConfig paths look like (in the root folder):
"baseUrl": "./",
"paths": {
"@myApp/core/src/*": ["./packages/core/src/*"],
}
I also tried this:
"baseUrl": "./",
"paths": {
"@myApp/core/*": ["./packages/core/*"],
}
This doesn't seem to be an IDE Issue as we have people on the team working with both VSCode and Webstorm, both groups of users experience this bug.
EDIT:
If you are also experiencing this issue I have written a temporary fix however a proper solution would be much appreciated!