# Extension points — rollup/rollup

> Canonical page: https://codevetter.com/unpack/rollup/extension-points

# Extension points — rollup/rollup

Scanned commit a77225f4b9ef88f20d26a32a3dc70954241f3fb6 (2026-10-02). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

Plugins are the primary public extension mechanism and receive graph, parsing, filesystem, cache, and file-emission capabilities. Hook execution categories and ordering are explicit contracts. Internal extension surfaces include option normalization, finalisers, AST schemas, and browser replacement registries. New native functions require coordinated adapters across environments.
- Plugins are objects with properties and build/output hooks; documented examples implement resolveId and load to supply virtual modules. — [docs/plugin-development/index.md#L9-13](https://github.com/rollup/rollup/blob/a77225f4b9ef88f20d26a32a3dc70954241f3fb6/docs/plugin-development/index.md#L9-L13) [docs/plugin-development/index.md#L19-44](https://github.com/rollup/rollup/blob/a77225f4b9ef88f20d26a32a3dc70954241f3fb6/docs/plugin-development/index.md#L19-L44)
- PluginDriver distinguishes first-result hooks, sequential argument reduction, and parallel hooks; sequential-marked parallel hooks wait for preceding parallel work. — [src/utils/PluginDriver.ts#L140-164](https://github.com/rollup/rollup/blob/a77225f4b9ef88f20d26a32a3dc70954241f3fb6/src/utils/PluginDriver.ts#L140-L164) [src/utils/PluginDriver.ts#L180-221](https://github.com/rollup/rollup/blob/a77225f4b9ef88f20d26a32a3dc70954241f3fb6/src/utils/PluginDriver.ts#L180-L221)
- Hook descriptors support pre/post ordering; validated plugins are returned as pre, normal, then post groups. — [src/utils/PluginDriver.ts#L440-457](https://github.com/rollup/rollup/blob/a77225f4b9ef88f20d26a32a3dc70954241f3fb6/src/utils/PluginDriver.ts#L440-L457)
- PluginContext exposes addWatchFile, cache, fs, emitFile, getFileName, module introspection, load, parse, resolve, setAssetSource, and structured logging. — [src/utils/PluginContext.ts#L56-97](https://github.com/rollup/rollup/blob/a77225f4b9ef88f20d26a32a3dc70954241f3fb6/src/utils/PluginContext.ts#L56-L97)
- Output plugins are appended to the base driver's plugins with shared emission state; input hooks in output-only plugins produce warnings. — [src/utils/PluginDriver.ts#L101-133](https://github.com/rollup/rollup/blob/a77225f4b9ef88f20d26a32a3dc70954241f3fb6/src/utils/PluginDriver.ts#L101-L133)
- Input fs is an injectable capability used by core I/O and exposed as this.fs; browser defaults are throwing stubs checked against RollupFsModule. — [src/utils/options/normalizeInputOptions.ts#L49-56](https://github.com/rollup/rollup/blob/a77225f4b9ef88f20d26a32a3dc70954241f3fb6/src/utils/options/normalizeInputOptions.ts#L49-L56) [src/utils/PluginContext.ts#L66-66](https://github.com/rollup/rollup/blob/a77225f4b9ef88f20d26a32a3dc70954241f3fb6/src/utils/PluginContext.ts#L66-L66) [browser/src/fs.ts#L1-20](https://github.com/rollup/rollup/blob/a77225f4b9ef88f20d26a32a3dc70954241f3fb6/browser/src/fs.ts#L1-L20)
- scripts/ast-types.js defines generated Rust constants, JSON decoders, internal AST parsers, and child keys; format finalisers have a separate shared function interface and registry. — [scripts/ast-types.js#L1-21](https://github.com/rollup/rollup/blob/a77225f4b9ef88f20d26a32a3dc70954241f3fb6/scripts/ast-types.js#L1-L21) [src/finalisers/index.ts#L12-36](https://github.com/rollup/rollup/blob/a77225f4b9ef88f20d26a32a3dc70954241f3fb6/src/finalisers/index.ts#L12-L36)
- Browser substitutions are registered in JS_REPLACED_MODULES and wasmModulesMap; additional binding functions must synchronize both Rust crates and all three JavaScript handover points. — [build-plugins/replace-browser-modules.ts#L8-33](https://github.com/rollup/rollup/blob/a77225f4b9ef88f20d26a32a3dc70954241f3fb6/build-plugins/replace-browser-modules.ts#L8-L33) [rust/AGENTS.md#L23-28](https://github.com/rollup/rollup/blob/a77225f4b9ef88f20d26a32a3dc70954241f3fb6/rust/AGENTS.md#L23-L28)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
