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

前端 未结 14 1760
灰色年华
灰色年华 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条回答
  •  感情败类
    2020-11-22 01:45

    There are some modules and packages only necessary for development, which are not needed in production. Like it says it in the documentation:

    If someone is planning on downloading and using your module in their program, then they probably don't want or need to download and build the external test or documentation framework that you use. In this case, it's best to list these additional items in a devDependencies hash.

提交回复
热议问题