dividab / tsconfig-paths

Load node modules according to tsconfig paths, in run-time or via API.
MIT License
1.8k stars 100 forks source link

Paths in production #257

Closed hernique33comiitei closed 9 months ago

hernique33comiitei commented 10 months ago

A while ago, I saw a post in this issue talking about building with tsconfig-paths. For me it worked like this: node -r ts-node/register -r tsconfig-paths/register dist/index.js Is it correct for this to remain in production? Or should it somehow stick to the raw path when compiling?

marcj commented 9 months ago

You don't need ts-node/register when using the build/compiled files in dist/*.js. You only need tsconfig-paths/register. Yes, also in production

hernique33comiitei commented 9 months ago

Understood, thanks friend