To automate many monorepo tasks this uses modular-scripts
:
# add a new package to the monorepo
yarn modular add
# start an app/view with local webpack dev server
yarn modular start PKGNAME
Configured to use vite as the builder for unit tests run through vitest. Using the explicit import style instead of implicit globals for ease of consuming the tests standalone:
import { describe, expect, it } from 'vitest';
Run from the root of the project as:
yarn vitest
The build is managed by modular-scripts
which currently uses webpack
or esbuild
, so vite
is not a build tool used for the application as a whole, remaining only an aide to development.
Use of a consistent version of yarn
achieved with the packageManager
setting in package.json
along with a cached copy of yarn
itself in the .yarn/releases
folder.
Update to the latest yarn by running:
yarn set version latest --yarn-path
git add package.json .yarn/releases