The role of dependencies and devDependencies in package.json?

Please tell me the role of dependencies and devDependencies in package.json. Online, it is said that the development environment and the formal environment depend on packages, but I can also pack the vuex in the devDependencies, package, and use the configuration of the formal environment when packing.

Jan.08,2022

is the distinction between production and test environments. But if your project uses it, it will be packaged no matter where it is.


dependencies formal environment, runtime dependency-- save abbreviation:-S
devDependencies development environment-- save-dev abbreviation:-Smurd D

for example: in vue, scss is used only when developing, so install: npm i node-sass sass-loader-Smurd

when build is not used online, it has been parsed
if you use axios to send network requests in a project, npm i axios-S should be used both locally and online-- save-dev installation will not be displayed online but based on local development

Menu