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

Wrong (default) tsconfig.json used even though custom one is provided in tsup config #791

@mkosir

Description

@mkosir

I have my own tsconfig file path defined to be used for tsup

// tsup.config.ts
{
  entry: ['src/export-types/index.ts'],
  dts: { only: true },
  clean: true,
  tsconfig: 'tsconfig.build.json',
}

which has incremental: false

// tsconfig.build.json
{
  "compilerOptions": {
    ...
    "incremental": false,
    ...
}

Somehow tsup still pick up my (default) tsconfig.json, thats in the root of the project, which has "incremental": true and fails with an error:

CLI Building entry: src/export-types/index.ts
CLI Using tsconfig:tsconfig.build.json  <-- notice that tsup output in terminal states correct/defined tsconfig file
CLI tsup v6.5.0
CLI Using tsup config: tsup.config.ts
DTS Build start
error TS5074: Option '--incremental' can only be specified using tsconfig, emitting to single file or when option '--tsBuildInfoFile' is specified.

If I delete tsconfig.json in root folder (that of course must be present for VS code to pick it up, and for development config), tsup bundles with defined/correct tsconfig.build.json and no error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions