The problem:
I am trying to avoid relative module paths by setting the baseUrl option in my tsconfig.json file. Unfortunately it always says it can't find the module and I don't know why it can't find the module. Am I missing something / Do I need to do something else besides setting the baseUrl to my src folder in the tsconfig?
Actually intellisense is showing me the module's folder ('utils') when I try to import it:

My project structure:
root
- dist
- src
- MyProject.ts
- utils
- IntHelper.ts
- tsconfig.json
File: MyProject.ts
import { IntHelper } from 'utils/IntHelper';
File: IntHelper.ts
export module IntHelper {
export const xy: string = 'Test';
export function crossSum(int: number) {
return int; // Nonsense - ofcourse.
}
}
Tsconfig.json:
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"moduleResolution": "node",
"sourceMap": true,
"outDir": "dist",
"baseUrl": "./src",
"paths": {
"*": [
"node_modules/*",
"src/types/*"
]
}
},
"include": [
"src/**/*"
]
}
