Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 493 Bytes

File metadata and controls

23 lines (16 loc) · 493 Bytes

CommonJS example for TypeScript with @babel/preset-typescript

Settings

See package.json and .babelrc.

  • set type to "module" in package.json
  • specify "@babel/preset-env": "7.7.5" in package.json (exactly "7.7.5"; neigher "^7.7.5" nor "~7.7.5")
  • set modules to false in .babelrc
  • use module-extension-resolver plugin in .babelrc

Build

npm ci
npm run build

Run

node ./dist/index.js