dividab / tsconfig-paths

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

Paths in production #257

Closed hernique33comiitei closed 1 year ago

hernique33comiitei commented 1 year 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 1 year 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 1 year ago

Understood, thanks friend