learn-a icon indicating copy to clipboard operation
learn-a copied to clipboard

Sample repo using lerna with TypeScript project references

Lerna monorepo + yarn workspaces + typescript project references + tsc -b

Features

  • lerna monorepo
  • yarn workspaces
  • typescript project references for incremental build setup according to https://www.typescriptlang.org/docs/handbook/project-references.html
  • reused configs

Building both cjs and esm

  • yarn build will build the cjs (incremental builds using tsc -b) to lib/cjs in each project
  • yarn build:esm will build the esm (non-incremetal) to lib/esm in each project

Setting up this repo

> git clone https://github.com/rosskevin/learn-a.git
> git checkout build-cjs-esm
> cd learn-a
> yarn install
> lerna bootstrap
> yarn clean:build && yarn build && yarn bundle