"name"


{
  "name": "package-name"
}

"name" 字段定义了包的名称。 发布到 npm 仓库需要满足特定要求的名称。

除了 "exports" 字段外,"name" 字段还可用于自引用使用其名称的包。

{
  "name": "package-name"
}

The "name" field defines your package’s name. Publishing to the npm registry requires a name that satisfies certain requirements.

The "name" field can be used in addition to the "exports" field to self-reference a package using its name.