Skip to content

feat: support custom error formatting#153

Merged
imranbarbhuiya merged 1 commit intoimranbarbhuiya:mainfrom
markdalgleish:format-error
Aug 25, 2023
Merged

feat: support custom error formatting#153
imranbarbhuiya merged 1 commit intoimranbarbhuiya:mainfrom
markdalgleish:format-error

Conversation

@markdalgleish
Copy link
Contributor

@markdalgleish markdalgleish commented Aug 25, 2023

This PR adds a new formatError option so that consumers can customise the error messages when an error module is detected. This is useful in the context of a tool like Remix where we'll want to give our consumers more Remix-specific advice for how to fix the error since they don't have access to this esbuild plugin directly.

I've also improved the error messaging for when a module doesn't have a polyfill available. Without this we'd end up instructing our consumers to enable the polyfill, only for the polyfill to fail.

Status and versioning classification:

  • Code changes have been tested and working fine, or there are no code changes
  • This PR changes the library's interface (methods or parameters added)

@imranbarbhuiya imranbarbhuiya merged commit 769e642 into imranbarbhuiya:main Aug 25, 2023
@markdalgleish markdalgleish deleted the format-error branch August 25, 2023 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants