justkey007 / tsc-alias

Replace alias paths with relative paths after typescript compilation
MIT License
876 stars 63 forks source link

production build module without .js from node_modules (symlink) #201

Open GoodNew5 opened 11 months ago

GoodNew5 commented 11 months ago

Hello guys, i have problem 🙏

I have a local module which is located in node_modules, such ⤵️ cd lib-A yarn add link:../lib-B

When another project uses it in its code in the final dist, then all files are included with the .js extension, all except those imported from node_modules

here is an example

image

here another one example

image

The only way that I have currently found for myself to fix the problem is to write in the source module with .js then production build module will be with .js

here is an example

image

Can i fix that most better way?