u/MooshyTendies

How to deploy a single .ts script to server from a monorepo?

What is the proper way to do that? I got a big monorepo of various .ts scripts that share imports, that's why I put them in the monorepo but I don't want or need to upload the entire repo to the server when I only want to run one of the .ts files with pm2.

What are my options? I don't want to manually find all the imports and dependencies and upload .ts file to be run with tsx. That sounds like too much manual error prone work.

If I transpile only a single .ts script into a .js script, can I get any kind of CLI option to output some kind of a external dependency list?

If using esbuild, how do I know what needs to be excluded and installed manually on the server? Figure it out by trial and error?

reddit.com
u/MooshyTendies — 8 days ago