Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tsconfig.paths not working with ES modules #1596

Closed
its-dibo opened this issue Jan 15, 2022 · 2 comments
Closed

tsconfig.paths not working with ES modules #1596

its-dibo opened this issue Jan 15, 2022 · 2 comments

Comments

@its-dibo
Copy link

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

minimal reproduction

@cspotcode
Copy link
Collaborator

Related:
#1452
#1375
#1585

Closing as answered and tracked by other issues

@its-dibo
Copy link
Author

related: dividab/tsconfig-paths#122

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants