Run typescript scripts using esbuild and @node-loaders/esbuild
Using cli:
esbuildx file.ts
Using API (Use cjs for executables, refer to https://github.com/nodejs/modules/issues/152):
#!/usr/bin/env node
module.exports = (async () => {
const { default: esbuildx } = await import('./esbuildx.js');
await esbuildx({ executable });
})();
MIT