Loading Depth Study
Preparing your workspace
Dependencies are packages an application needs to operate, while devDependencies are generally packages used for development, testing, building, or tooling.
A production application needs certain packages while it is running. Other packages are only needed to develop or build the application, such as test runners, linters, formatters, and type-checking tools. Correctly separating these categories makes the project clearer and can reduce unnecessary production dependencies.
A web server may need Express at runtime, while a test runner and code formatter are generally development tools.
npm install express npm install -D vitest npm install -D prettier # Resulting idea: # dependencies → runtime # devDependencies → development/tooling
Packages are placed into the appropriate dependency section based on how the project uses them.