tsconfig.paths not working with ES modules

Viewed 129

I switched my project to enable ES modules:

  • added type: module in package.json
  • use node --loader ts-node/esm instead of ts-node
  • changed module: commonjs to esnext

It works fine, except when starting using paths aliases.

so, import test from './file'; works, but import test from '@app/file'; doesn't work

minimal reproducible example

0 Answers
Related