I found a configuration that fixes this. Pay attention to the magic of "path" and "baseUrl"
{ "version": "2.1.5", "compilerOptions": { "module": "commonjs", "target": "ES5", "removeComments": true, "preserveConstEnums": true, "inlineSourceMap": true, "lib": [ "es6", "dom" ], "typeRoots": [ "src/subfolder/node_modules/@types" ], "moduleResolution": "node", "baseUrl": "./", "paths": { "*": [ "src/subfolder/node_modules/@types/*", "*" ] } }, "exclude": [ "node_modules", "src/subfolder/node_modules" ]
}
source share