-
Install all dependencies
pnpm recursive install
-
Check
node_modules
sizedu -sh node_modules # 27M
-
Prune devDeps
pnpm recursive prune --prod
-
Check
node_modules
sizedu -sh node_modules # Still 27M!
-
Clean up node_modules manually
rm -rf ./node_modules rm -rf ./packages/*/node_modules
-
Install without devDeps
NODE_ENV=production pnpm recursive install
-
Check
node_modules
sizedu -sh node_modules # 488K!