A development dependency is a package recorded in package.json for project tooling rather than application runtime. Install it with --save-dev; runtime packages belong in dependencies. Local installation also lets other packages in the project use the tool. section 5.3
{
"name": "tools",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"tsc-watch": "^6.0.0",
"typescript": "^5.0.2"
}
}
A package.json example records tsc-watch and typescript under devDependencies, with version ranges such as ^6.0.0 and ^5.0.2. section 5.3
Use the NPM commands that match the package's role:
- Run npm install --save-dev package@version to install a specific local development package and add it to devDependencies. section 5.3
- Run npm install package@version for a package added to dependencies rather than devDependencies. section 5.3
- Run npm install to perform a local install from package.json. section 5.3
Container deployment configuration
A deploy-package.json file can place express, json-server, and connect-history-api-fallback under devDependencies when the application imports have already been incorporated into a webpack bundle and the packages are needed to run the container. section 19.4.1 section 21.5.1



