Save package to devDependencies.
Section: Dependency Types
Add development dependency
bash
bash
pnpm add -D vitestExplanation
Save package to devDependencies.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Dependency Types
Add peer dependency entry
Install for local development and declare the peer dependency in package.json.
Clean install from lockfile
Perform a clean install from an existing lockfile.