justkey007 / tsc-alias

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

Is it possible to also replace calls to require() function ? #183

Closed meypod closed 1 year ago

meypod commented 1 year ago

Hi I'm trying to use this in a react native mono repo I wanted to know if it's possible to also replace the paths inside the require() calls that exists in the project ? I am using require() in my ts files, which will be later picked up by babel, but since it's in another package, the require paths resolve to wrong locations, which I need to tackle on my build step of the package

it seems to me if I manage to make tsc-alias to also work for require(), my problem will be solved