DEV Community

[Comment from a deleted post]
Collapse
 
itzsaga profile image
Seth

Glad you're enjoying it Nico.

So the --save-dev flag are things that are needed to develop the project. These dependencies will not be available when the code is in production. Anything installed without the flag will be available to the production code. We need react and react-dom for our app to run in the wild.

This is from the purpose of npm being able to package things up and add them to the npm repository. We're essentially creating an npm package, just like the ones we are installing. If we were to package this up and add it to npm then only the code the is not a devDependency would be available to the end user.

Hopefully that makes sense. Let me know if it doesn't. It's not something I've ever explained before.