Skip to content

Latest commit

 

History

History
 
 

typescript-ts-node-esm-loader

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

TypeScript with ts-node/esm Loader

A standalone project showing TypeScript source files transpiled on-the-fly with [ts-node/esm](ts-node/register`](https://typestrong.org/ts-node/docs/usage/#node-flags-and-other-tools) as a Node ECMAScript Modules loader.

npm i
npm run test

Note that the tsconfig.json file has compilerOptions:

  • "noEmit": true: as there's no need to transpile .ts files on disk to .js files on disk before running these tests
  • "module": "ESNext: indicating code should be transpiled in-memory as ESM

Additionally, package.json has "type": "module". If it didn't, TypeScript source files would need the .mts extension.