Dependencies vs DevDependencies: Choose Wisely!
package.json has two big buckets: dependencies and devDependencies. Looks minor, yet the choice decides whether production builds succeed, bundles stay lean, and newcomers install the project without surprises.
dependencies.devDependencies.Unsure? Ask: “Will production crash without this library?” If yes, it belongs to dependencies.
dependencies.devDependencies.devDependencies.devDependencies.dependencies.@types/*). Needed before build, never shipped → devDependencies.dependencies.devDependencies.npm install --production skips it, app crashes on deploy.scripts or lint-staged, it almost always belongs to devDependencies.npm ci --only=production tells you whether production has everything it needs.package.json and drop unused packages.Putting packages in the right bucket saves time, space, and nerves. Stick to the simple rule “runtime in dependencies, tooling in devDependencies”, keep the list tidy, and your project will stay healthy. 💪