Skip to content

docs(contribute): add the codebase overview from #1824 - #8407

Merged
alexander-akait merged 1 commit into
mainfrom
docs/codebase-overview
Sep 13, 2026
Merged

alexander-akait merged 1 commit into
mainfrom
docs/codebase-overview

Conversation

@alexander-akait

Copy link
Copy Markdown
Member

Summary

#1824 asked for two things back in 2018. Checking both against the site today:

  • "Section for contributing built into docs arch" — done long ago. /contribute/ has seven pages, and Writing a Loader, Writing a Plugin, Plugin Patterns, Debugging, Release Process and the Writer's Guide cover extending webpack and the project's process.
  • "Section for code overview built into docs arch" — never written. Nothing on the site describes webpack's own source tree, and CONTRIBUTING.md (94 lines: issues, setup, submitting changes, releases, types) has no architecture section either. So a contributor who wants to change lib/ has nowhere to start.

This adds that page. Refs #1824 — the second box, and it is the last one open.

On not duplicating, which the thread was explicit about: skipjack asked that the pages live in the existing Contribute section and that CONTRIBUTING.md not be restated. So the page covers only the source layout, and hands off for everything else — process to CONTRIBUTING.md, tests to TESTING_DOCS.md, hooks to the existing /api/compiler-hooks/ and /api/compilation-hooks/, and writing loaders and plugins to the pages that already do that. A T> at the top says which audience it is for, since "contributing to webpack" and "extending webpack" get mixed up constantly.

Worth noting separately: the site linked to neither CONTRIBUTING.md nor TESTING_DOCS.md from anywhere. /contribute/ now does.

Contents: the five objects a build runs through (Compiler, Compilation, Module, Dependency, Chunk) with a link to each file; the make / seal / emit phases with the method that starts each; a table of what every lib/ directory holds; and four recipes for finding the code behind a configuration option, a hook, a runtime symbol, or an error message.

Checked against the repository rather than written from memory: each file and directory named exists on main today, the lib/ grouping was built from the actual 38 subdirectories, and the entry points quoted are real (Compiler#compile, Compilation#seal, Compiler#emitAssets).

What kind of change does this PR introduce?

docs

Did you add tests for your changes?

n/a — documentation only.

Does this PR introduce a breaking change?

No — one new page plus two lines on /contribute/.

If relevant, what needs to be documented once your changes are merged or what have you already documented?

n/a. If you want to follow the thread's other suggestion, CONTRIBUTING.md could later link here instead of growing an architecture section of its own.

Use of AI

AI was used. Claude Code checked what /contribute/ and CONTRIBUTING.md already cover so the page would not repeat them, verified every file, directory and entry point it names against the webpack repository, and drafted the page; I reviewed it before pushing.


Generated by Claude Code

Issue #1824 asked for two things in 2018: a contributing section in the docs
and a codebase overview. The section has existed for years; the overview was
never written, so nothing on the site tells a would-be contributor how
webpack's own source is laid out, and the site never linked to CONTRIBUTING.md
or TESTING_DOCS.md at all.

Adds a page mapping the five objects a build runs through, the three phases,
what each lib/ directory holds, and how to find the code behind an option, a
hook, a runtime symbol or an error. It links out to CONTRIBUTING.md and
TESTING_DOCS.md for process and tests rather than restating them, which is what
the issue thread asked for.
@vercel

vercel Bot commented Sep 13, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
webpack-js-org Ready Ready Preview Sep 13, 2026 7:31pm UTC

Request Review

@alexander-akait
alexander-akait merged commit a81cee3 into main Sep 13, 2026
12 checks passed
@alexander-akait
alexander-akait deleted the docs/codebase-overview branch September 13, 2026 20:06

This branch was successfully deployed

1 active deployment
Preview — 15c7366a Deployed Sep 13, 2026 by vercel[bot]
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.

1 participant