Using `this.error` outside the transformation context
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 26.3k
- Forks
- 1.8k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 20
Description
We want to run some processes in buildStart and watchChange in a plugin that I work on. The process needs to emit diagnostics and wish to use the rollup API to show the user those diagnostics, but it always throws when we use this.error outside the transform hook.
Is there a way to use this API and recover from the error in other hooks?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the plugin hook entry points named in the issue: buildStart, watchChange, and transform, along with how this.error is handled in each context. Determine whether diagnostics can be emitted and recovered from outside transform, then document or test the supported behavior and its limitations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100