Skip to content

feature request: Support outputting absolute paths in error messages #3023

Description

@domdomegg

esbuild has a format messages API: https://esbuild.github.io/api/#format-messages

It would be useful if a property was added to FormatMessagesOptions, like pathType: "absolute" | "relative" which allowed users to control the output format.

This particularly helps for two cases:

  • Monorepo setups, where relative paths might not be unique. Here, it allows distinguishing paths and so users can directly click links to the files with errors.
  • Automated log reading tools, like GitHub's pattern matchers, to show errors in CI more easily.

Similar discussion for TypeScript is here: microsoft/TypeScript#36221

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions