Open rhyek opened 1 year ago
FYI my current workaround:
#!/usr/bin/env ts-node --transpileOnly
import execa from 'execa';
import * as ts from 'typescript';
const entrypoint = process.argv[2];
const configFile = ts.findConfigFile(entrypoint, ts.sys.fileExists);
const args = process.argv.slice(3);
void (async () => {
await execa(
'/usr/bin/env',
[
'ts-node',
...(configFile
? ['--project', configFile, '--require', 'tsconfig-paths/register']
: []),
entrypoint,
...args,
],
{
stdio: 'inherit',
},
);
})();
Hello. Not sure what project would need to support this, so I am linking to the issue in ts-node: https://github.com/TypeStrong/ts-node/issues/1948