Skip to content

Info/Warn when CJS is used #260

Open
Open
@TheAlexLichter

Description

@TheAlexLichter

Clear and concise description of the problem

tsdown supports CJS as a possible output format. Given that require(esm) exist nowadays and Node 18 is EOL, ESM or at least dual export should be preferred and CJS should be discouraged.

Suggested solution

While there are many ways to nudge towards using ESM, from being radical and remove CJS support over to more gentle ways, emitting an info/warning when using CJS could be helpful and make people aware of the current situation where switching is less costly than before, ideally paired with some blog post or documentation (could be living directly in the tsdown docs).

Alternative

No response

Additional context

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions