Skip to content

vue-tsc --declaration --emitDeclarationOnly outputDir #3321

@VividLemon

Description

@VividLemon

For awhile I have been using https://github.com/qmhc/vite-plugin-dts , but I have had many problems with it. It wasn't until recently when I found that vue-tsc performs this same function. The only issue that I have with using vue-tsc for this is specifying the output path of the dts files. The default behavior for vite-plugin-dts is to move these files over to the dist folder. This is what I would prefer. However, vue-tsc puts all dts files in place and there doesn't seem to be a way to move these files around automatically. A feature such as https://github.com/qmhc/vite-plugin-dts#options outputDir would make it so I can use vue-tsc as the declaration build tool. Perhaps there exists a way to do this, the documentation is somewhat limited outside of some discussion threads... But I haven't found anything, nor does the code show any way to do this. The types for their outputDir are outputDir?: string | string[], I personally don't care much for the string[] support, and since this is all just command line stuff, it may be difficult to convey a string[] as a arg flag. So perhaps just string could be acceptable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions