4 ms·
We've been using ts-node with swc for ages and seems to work great. Never really understood why tsx exists.
by __alexs 1y ago
We've been using ts-node with swc for ages and seems to work great. Never really understood why tsx exists.
- jahewson 1y agoYou’re in luck, around half the page linked to above is devoted to explaining that: > The idea for tsx came about during a time when the Node.js ecosystem was getting fragmented due to the release of ES Modules (ESM). As packages migrated to ESM, projects struggled to reconcile their CommonJS apps with ESM dependencies. >Back then, ts-node was the go-to tool for running TypeScript in Node.js, but it lacked ESM support and was quite complicated to use. We noticed several open-source tools using esbuild to run TypeScript in Node.js and decided to bring these efforts together into one simple, cohesive project.