🔹 dependencies
Packages your app needs to run in production.
-
Used in the app's runtime code
-
Installed on both development and production environments
-
Example: Frameworks, HTTP clients, database drivers
Example:
🔸 devDependencies
Packages your app only needs during development (not in production).
-
Used only for building, testing, linting, compiling
-
Installed only in development, not in production (
NODE_ENV=production
) -
Example: TypeScript, Webpack, ESLint, test libraries
Example:
Dev (write code) | Build (transpile/bundle) | Run (prod server) | |
---|---|---|---|
dependencies |
✅ | ✅ | ✅ |
devDependencies |
✅ | ✅ | ❌ |
No comments:
Post a Comment