Skip to content

declarationDir outputs extra src folder? -- need to set rootDir in tsconfig #64

@szimek

Description

@szimek

What happens and why it is wrong

I'm rewriting my library (https://github.com/szimek/signature_pad) to TypeScript - this is the first time I'm working with this language. I've specified declarationDir: 'dist/types' in tsconfig.js and set useTsconfigDeclarationDir: true. However, after building the library, the declaration files end up in dist/types/src. Is it supposed to be like this? If not, how can I change it, so that they end up directly in dist/types?

Versions

  • typescript: 2.7.2
  • rollup: 0.56.5
  • rollup-plugin-typescript2: 0.12.0

rollup.config.js

https://github.com/szimek/signature_pad/blob/typescript/rollup.config.js

tsconfig.json

https://github.com/szimek/signature_pad/blob/typescript/tsconfig.json

package.json

https://github.com/szimek/signature_pad/blob/typescript/package.json

Metadata

Metadata

Assignees

Labels

kind: supportAsking for support with something or a specific use casesolution: tsc behaviorThis is tsc's behavior as well, so this is not a bug with this plugin

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions