1.

What is the difference between package.json and package-lock.json in Ionic Project.

Answer»

For most modern JS libraries like React, Vue, Angular etc. They need a centralised PLACE to manage the different plugins and packages that the PROJECT uses. Package.json is mainly used for that reason.

Package.jsonPackage-lock.json
It records the minimum version of the package that the project needs. If we update packages to the latest version, that will not have any effect on package.json.It records the exact version of each installed package which allows you to re-install them. Future installs will be able to build an identical dependency.
The package.json is used for more than DEPENDENCIES - like defining
project properties, description, author & license information, scripts, etc.
The package-lock.json is all about the packages. And LOCKING them to a PARTICULAR version.
We cannot build an Ionic project without this file.We can build an Ionic Project without this.


Discussion

No Comment Found