Webpack dependency problem

  node.js, question

After learning the webpack for the first time, I came across a problem, that is, I don’t want to type the code in cmd line by line to install the loader, but write it directly into the dependency of package.json, which is not only installed but also more clearly understood. however, I don’t know the version number of the loader and how to solve this problem.


Where can I see this version number?

  1. The normal usage process is to directly use npm to install the dependency package in the project directory. When the –dev-save parameter is added duri ng installation, the dependency will be automatically declared in the package.json file.

  2. If you need to add it manually, you need to query the version on the npmjs.org.