What's the difference between dependencies, devDependencies and peerDependencies in npm package.json file?

前端 未结 14 1788
灰色年华
灰色年华 2020-11-22 00:43

This documentation answers my question very poorly. I didn\'t understand those explanations. Can someone say in simpler words? Maybe with examples if it\'s hard to choose si

14条回答
  •  梦毁少年i
    2020-11-22 01:40

    A simple explanation that made it more clear to me is:

    When you deploy your app, modules in dependencies need to be installed or your app won't work. Modules in devDependencies don't need to be installed on the production server since you're not developing on that machine. link

提交回复
热议问题