DEV Community

Cover image for How to run TypeScript natively in Node.js with TSX

How to run TypeScript natively in Node.js with TSX

Lucas Santos on November 28, 2023

Who hasn't wondered how runtimes like Deno can run TypeScript natively? When will it come to Node? When will we be able to run native TypeScript an...
Collapse
 
moinulmoin profile image
Moinul Moin

for Node.js v20.6.0 and above, we can use this,

node --env-file=.env --import=tsx --watch ./src/index.ts