use a better approach to import the main entry point based on the package.json
in order to simplify the implementation and align with our coding standards, we'll check only limited places inside package.json for determining the entry point:
{
"main": "index.mjs", <-- here
"exports": {
".": {
"types": "./dist-types/index.d.ts",
"import": "./dist-mjs/index.mjs", <-- and here
"default": "./dist-mjs/index.mjs"
}
},
}
error will be reported if no entry point is found in the above locations.
for the details of all the available options, please refer to https://nodejs.org/api/packages.html#package-entry-points