Skip to content

When outputting undefined import messages, indicate that this could also happen due to a devDependencey that should by a normal dependency #743

@kalvenschraut

Description

@kalvenschraut

Clear and concise description of the problem

I had to really debug to minimal reproduction to release that the issue why the latest tsdown started outputting a bunch of warnings on my was due to the type it stopped pulling in being a dev dependency and not a normal dependency.

Suggested solution

Output a message that says this could happen because a dependency is marked a dev dependency instead of a prod dependency.

Alternative

Even better if tsdown can check that the required package that is missing is a dev dependency and then output that info directly in this situation.

Additional context

This package is located inside a monorepo so it never actually caused problems that we noticed, but if I were to publish this package consumers of it would so I see the value of this warning. The main problem was that it was very time consuming to find this out

Image

reproduction repo/branch

https://github.com/RTVision/invalid-dts-generation/tree/invalid-type-gen

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions