2 years ago
#54272

Sh eldeeb
tsconfig.paths not working with ES modules
I switched my project to enable ES modules:
- added
type: module
in package.json - use
node --loader ts-node/esm
instead ofts-node
- changed
module: commonjs
toesnext
It works fine, except when starting using paths aliases.
so, import test from './file';
works, but import test from '@app/file';
doesn't work
typescript
es6-modules
ts-node
0 Answers
Your Answer