Skip to content

rollup-plugin-dts reports error TS6307 with composite project #127

@shigma

Description

@shigma

Checklist

  • I can reproduce this issue when running this plugin on its own.
    Other plugins, such as node-resolve are known to cause issues.
  • I am running this plugin on .d.ts files generated by TypeScript.
    The plugin can consume .ts and even .js files (with allowJs: true), but this is known to cause issues.
  • This issue is not related to rolling up @types.
    The plugin ignores these by default, unless respectExternal is set. @types can contain hand-crafted code which is known to cause issues.

Code Snipped

I use a composite project like this:

packages/
  koishi/
    dist/
      index.d.ts
      index.js
    src/
      index.ts
    tsconfig.json
  other-packages/
rollup.config.js
// package/koishi/tsconfig.json
{
  "extends": "../../tsconfig.base",
  "compilerOptions": {
    "outDir": "dist",
    "rootDir": "src",
  },
  "include": [
    "src",
  ],
}

Error Message

TS6307: File 'packages/koishi/src/worker.ts' is not listed within the file list of project ''. Projects must list all files or use an 'include' pattern.

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidThis doesn't seem right

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions