tsconfig-replace-paths
tsconfig-replace-paths copied to clipboard
Using this with NX lib imports results in importing TS files instead of JS
So I have a project set up using NX, with some libs attached and imported via import smth from @test-app/dto
.
And when building it with tsc, and then trying to update imports it is changing imports to .ts
files instead of .js
.
This is from --verbose
run:
import '@test-app/dto' replacing '@test-app/dto' -> '../../../../../../../libs/dto/src/index.ts' referencing libs/dto/src/index.ts
/Users/user/WebstormProjects/test-app/dist-tsc/apps/api/src/controllers/accounting/management-contracts/management-contracts-index/get-management-contracts-index-page.js: replaced 1 paths
Any ideas on how to fix it?
try add .js
to importing @test-app/dto
in your source file