When developing with vue,react, how do you know whether the dependency package needs to be installed in the production or development environment

in the figure above, if I put "babel-polyfill": "^ 6.26.0" into the development environment, will the packaged project not work in the production environment?

does production and development install the same tools?

Mar.10,2021

{
  "name": "xxxxxx",
  "version": "11111",
  "description": "xxxxxxx",
  "author": xxxxx",
  "private": true,
  "scripts": {
    "dev": "node server.js",
    "start": "node server.js",
    "build": "node build.js "
  },
  "dependencies": {
      
  },
  "devDependencies": {
    "webpack": "^2.6.1",
  }
}

the difference between the production environment and the build environment is that the package is different according to the input of the command line, such as npm run dev or npm run build, development package. However, the production environment will get the compressed files and reduce the file size. If the production environment does not have one, the package of the development environment will be read by default

.
Menu