Skip to content

Add support for target: baseline-widely-available similar to Vite #893

Description

@amanmahajan7

Clear and concise description of the problem

As a developer using tsdown for browser-targeted packages, I want a baseline-widely-available target option so that I don’t have to hardcode and maintain browser version floors manually.

Right now I have to use explicit targets like:

target: ['chrome117', 'edge117', 'firefox116', 'safari17']

and the same again for CSS:

css: {
  target: ['chrome117', 'edge117', 'firefox116', 'safari17']
}

This works, but it gets stale over time and makes config harder to maintain. Vite already supports build.target: "baseline-widely-available", and a similar option in tsdown would make browser-library configs simpler and clearer.

Suggested solution

In the target option, support a string alias such as:

target: 'baseline-widely-available'
and ideally also allow the same value for:

css: {
  target: 'baseline-widely-available'
}

Implementation-wise, this could map internally to a maintained browser target set, similar in spirit to Vite’s behavior.

Alternative

Continue using explicit browser targets in user config.

Example:

target: ['chrome117', 'edge117', 'firefox116', 'safari17'],
css: {
  target: ['chrome117', 'edge117', 'firefox116', 'safari17']
}

This is workable, but it puts the maintenance burden on users and makes the intent less obvious.

Additional context

This would be especially helpful in projects using both Vite and tsdown, since it would align the mental model between the two tools.

Relevant Vite docs:
https://vite.dev/config/build-options#build-target

Validations

Activity

  1. added
    enhancement
    on Apr 6, 2026
  2. added
    good first issue
    on Apr 6, 2026
  3. amanmahajan7 commented on Apr 7, 2026

    @amanmahajan7
    Author

    Thank you for the quick fix.

  4. locked and limited conversation to collaborators on Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementgood first issue

    Fields

    Priority

    None yet

    Start date

    None yet

    Target date

    None yet

    Effort

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions