Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

CommonJS 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 ./dist/index.js