Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

ES Modules example for TypeScript with tsc

Settings

See package.json and tsconfig.json and .babelrc.

  • use both tsc and babel
  • set type to "module" in package.json
  • use module-extension-resolver plugin in .babelrc

Build

npm ci
npm run build # tsc -> babel(module-extension-resolver)

Run

node --experimental-modules ./dist/index.js