What is the difference between –save and –save-dev?

What is the difference between:

npm install [package_name]

and:

npm install [package_name] --save

and:

npm install [package_name] --save-dev

What does this mean? And what is really the effect of --save and -dev keywords?

Answer

  • --save-dev is used to save the package for development purpose. Example: unit tests, minification..
  • --save is used to save the package required for the application to run.

Leave a Reply

Your email address will not be published. Required fields are marked *