A development dependency is a package used during development, testing, or building rather than shipped as application code at runtime. In npm projects, --save-dev records this role in package.json under devDependencies. section 12.4
Use development dependencies for project tooling such as:
- Rollup, which bundles component source files into distributable output. section 12.4
- Web Component Tester, which runs component tests locally. section 13.2
- Babel, Mocha, and Rollup plugins, which support transpilation, testing, and builds. section 13.2
Install a local build tool
Run npm install --save-dev rollup. The command adds Rollup to devDependencies, keeps the tool with the project, and supports repeatable package scripts such as npm run build. A local install avoids depending on an uncertain global Rollup version. section 12.4
Listing 12.8. A package.json file after installing Rollup
{
"name": "wcia",
"version": "1.0.0",
"dependencies": {},
"devDependencies": {
"rollup": "^1.0.2" #1
}
}
Inspect the package.json shape that records Rollup separately from runtime dependencies. section 12.4



