Skip to content

docs(contribute): add pitching loaders section to writing-a-loader#8192

Merged
alexander-akait merged 1 commit intowebpack:mainfrom
raj-sapalya:docs/writing-a-loader-pitch-section
Apr 14, 2026
Merged

docs(contribute): add pitching loaders section to writing-a-loader#8192
alexander-akait merged 1 commit intowebpack:mainfrom
raj-sapalya:docs/writing-a-loader-pitch-section

Conversation

@raj-sapalya
Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce?
Documentation improvement — adds a missing section on pitching loaders.

Summary

The writing-a-loader guide covers simple and complex loader usage
but does not include a section on pitching loaders. The pitch phase is
one of the most confusing topics for loader authors — the left-to-right
execution, the data object, and short-circuiting behavior are not
intuitive without a concrete example.

This PR adds a ## Pitching loaders section with:

  • A working example showing data passing from pitch to the normal phase
  • A short-circuit example demonstrating early return behavior
  • A T> tip clarifying that data is shared only within the same loader
  • A W> warning explaining that the normal phase is skipped on short-circuit

Does this PR introduce a breaking change?
No.

What needs to be documented once your changes are merged?
Nothing additional.

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
webpack-js-org Ready Ready Preview, Comment Apr 14, 2026 5:13pm

Request Review

@alexander-akait alexander-akait merged commit 3f3f870 into webpack:main Apr 14, 2026
9 checks passed
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