How to build the “dist” in Node.js project

Here is the Leaflet Routing Machine:

https://github.com/perliedman/leaflet-routing-machine

The “main” in “package.json” is “./dist/leaflet-routing-machine.js“, but the real source file in the project is “src/index.js“.

Here is the “package.json”:
https://github.com/perliedman/leaflet-routing-machine/blob/master/package.json

{
  "name": "leaflet-routing-machine",
  "version": "3.2.12",
  "description": "Routing for Leaflet",
  "directories": {
    "example": "examples",
    "dist": "dist"
  },
  
  "main": "./dist/leaflet-routing-machine.js",
  
  "dependencies": {
    "@mapbox/corslite": "0.0.7",
    "@mapbox/polyline": "^0.2.0",
    "osrm-text-instructions": "^0.13.2"
  }
}

Here is the “src/index.js”:
https://github.com/perliedman/leaflet-routing-machine/blob/master/src/index.js

var L = require('leaflet'),
    Control = require('./control'),
    Itinerary = require('./itinerary'),

I’m creating my first node.js project, I think the “main” should be like this:

"main": "src/index.js"

What command is used to build the “./dist/leaflet-routing-machine.js” in the “Leaflet Routing Machine” project?