I'm using this paths feature in tsconfig.json to map to local projects:
"paths": {
"@MyOrg/MyPackage": ["../MyPackage/src"],
},
This works great because in my code I can
import { Models } from '@MyOrg/MyPackage'
So now I can work on @MyOrg/MyPackage locally on my machine and I don't need to change my code.
In some cases I want to build with these paths in effect and in other cases I want to build from the NPM package found in node_modules.
Is seems like I should just be able to have two tsconfig files - one which doesn't have the references in it.
What I am finding is that if I use the config file which contains the path, but the path isn't found for whatever reason, the compiler falls back to the one in the node_module folder.
I'm looking for a way to stop this behaviour - if it doesn't find the module at paths reference in my tsconfig, I want it to fail or give an error.