Boilerplate to compile both CommonJS and ES modules from "normal" typescript using Babel, with exported Typescript types to boot.
Still very much a moving target as I run into wrinkles in my own projects.
If using pnpm
, in .npmrc
:
public-hoist-pattern[]=*babel*
public-hoist-pattern[]=typescript
npm i -D @battis/babel npm-run-all del-cli
npx babel-config
For options:
npx babel-config --help