6

Most of my plugins are installed as Dev Dependencies in package.json. https://medium.com/@dylanavery720/npmmmm-1-dev-dependencies-dependencies-8931c2583b0c

But I still don't quite understand why and what would go in dependency vs dev dependency. If I was modifying the cypress core would I install as a dependency? OR if I had a real app mixed (example Node + React) mixed with the same package.json?

Daniel Vianna
  • 581
  • 6
  • 23

2 Answers2

3

Here's a very good explanation about dependencies: https://stackoverflow.com/a/22004559/9947826

Cypress is a testing tool and will not be required in a production environment. Therefore, it should be installed as a devDependency as stated in Cypress doc here.

PeaceAndQuiet
  • 1,692
  • 8
  • 13
0

I don't know about Cypress but Dev Dependencies are simply just dependencies that are only included in development mode. That is, when the environment variable NODE_ENV is set to development.

It is used for packages that are only intended to assist with debugging, and therefore should not be included in a finished production build.

chrispytoes
  • 1,714
  • 1
  • 20
  • 53