I have a typescript application that has paths
for absolute imports. My tsconfig looks like this:
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"utils*": ["src/utils*"],
"operations*": ["src/operations*"],
"actions*": ["src/actions*"],
"components*": ["src/components*"],
"constants*": ["src/constants*"],
},
"outDir": "dist",
"module": "esnext",
"target": "esnext",
"moduleResolution": "node",
"noEmit": true,
"lib": ["es2017", "dom"],
"noUnusedLocals": true,
"sourceMap": true,
"skipLibCheck": true,
"allowJs": true,
"jsx": "preserve",
"noUnusedParameters": true,
"preserveConstEnums": true,
"strict": true,
"allowSyntheticDefaultImports": true,
"noImplicitAny": true,
},
"exclude": [
"node_modules",
"dist",
],
"include": [
"./src/**/*"
],
"files": [
"./typings/index.d.ts"
]
}
and I'm trying to use imports like so:
import { AppStateType } from 'actions/app';
however I get cannot find module 'actions/app'
I followed this answer but it didn't seem to work.
What am I doing wrong here?