francescov1 / mongoose-tsgen

A plug-n-play Typescript generator for Mongoose.
102 stars 24 forks source link

Fix unable to find module of absolute path imports due to tsconfig's `baseUrl` not being read #155

Closed itsfaqih closed 1 month ago

itsfaqih commented 2 months ago

I was having trouble of not being able to generate the types due to using absolute path imports with baseUrl in the tsconfig.json.

image

Upon checking, apparently, the ts-parser does not read the baseUrl from the tsconfig.json, which causes the resolved path to be wrong

francescov1 commented 2 months ago

Thanks for the PR @itsfaqih, nice catch. Do you mind adding a test for the baseUrl being present?

francescov1 commented 1 month ago

Going to go ahead and merge this, I have another PR im working on for ensuring we capture baseUrl from extended tsconfig, so ill add tests there then deploy everything together