npm package.json field - main
The main
field is a module ID that is the primary
entry point to your program. That is, if your
package is named foo, and a user installs it, and
then does require(“foo”), then your main module’s
exports object will be returned.
If main is not set, it defaults to index.js in the
package’s root folder.