Right now I need to write import { MyFn } from '../lib/myUtils';
instead of import { MyFn } from 'lib/myUtils';
.
My structure is:
tsconfig.json
src -
index.ts
lib
- myUtils
....
I dont want to use any external library like module-alias
, I don't want to use @
like in @lib/myUtils
.
I just want to call import { MyFn } from 'lib/myUtils';
.
How do I set up my compiler options?
Use
"baseUrl": "./"
in yourtsconfig.json
file.Reference