Levelling up Monorepos with npm Workspaces
summary
Demos show npm v7 workspaces managing a monorepo: a single top-level node_modules and lockfile, npm init creating and registering new workspaces, and npm workspace add installing into the top-level tree. Commands shown include npm workspaces hoists dependencies to top-level node_modules, npm pkg set/get works across -ws to mutate package.json per workspace, and no-hoist workaround via npm aliases to force local installs. Scripts run per-package and in parallel with npm run all and run-p, and the live demo starts dev servers and succeeds.
AI-written summary · about
chapters (6)
- 0:00Introduction to monorepos
- 1:33Understanding workspaces
- 4:13Setting up workspaces
- 7:40Managing dependencies
- 13:26Running scripts
- 17:51Advanced commands








