这是indexloc提供的服务,不要输入任何密码
Skip to content

Declaration files don't work with multiple entrypoints #316

@kristojorg

Description

@kristojorg

This is my tsup config:

"tsup": {
    "splitting": false,
    "sourcemap": true,
    "clean": true,
    "dts": true,
    "format": [
      "esm",
      "cjs"
    ],
    "entryPoints": [
      "src/index.ts",
      "src/cli/index.ts"
    ]
  },

When I run build, the file dist/index.d.ts only has #!/usr/bin/env node as contents (even though this is not the CLI declaration file), nothing else. There is no file dist/cli/index.d.ts. If I run it with only a single entrypoint: src/index.ts, the dist/index.d.ts file is generated properly to correspond to src/index.ts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions