# Extension points — babel/babel

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

# Extension points — babel/babel

Scanned commit 7c1dcfac003791a7fee733ed13851a5cac1ccf1c (2026-09-30). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

Plugins and presets are the main compiler extension contracts. Factories receive versioned APIs and cache controls, while plugin objects supply visitors and lifecycle hooks. Parser mixins, standalone registries, CLI option declarations, and worker action dispatch provide additional integration points. These mechanisms enforce ordering and compatibility constraints that extensions must preserve.
- PluginObject supports name, manipulateOptions, pre/post, inherits, visitor, parserOverride, and generatorOverride; validation rejects unknown properties and catch-all visitor enter/exit handlers. — [packages/babel-core/src/config/validation/plugins.ts#L24-54](https://github.com/babel/babel/blob/7c1dcfac003791a7fee733ed13851a5cac1ccf1c/packages/babel-core/src/config/validation/plugins.ts#L24-L54) [packages/babel-core/src/config/validation/plugins.ts#L84-104](https://github.com/babel/babel/blob/7c1dcfac003791a7fee733ed13851a5cac1ccf1c/packages/babel-core/src/config/validation/plugins.ts#L84-L104) [packages/babel-core/src/config/validation/plugins.ts#L114-130](https://github.com/babel/babel/blob/7c1dcfac003791a7fee733ed13851a5cac1ccf1c/packages/babel-core/src/config/validation/plugins.ts#L114-L130)
- Plugin/preset factories receive api, options, and dirname; API construction includes cache, env, caller, targets, addExternalDependency, and plugin assumption access. — [packages/babel-core/src/config/full.ts#L257-271](https://github.com/babel/babel/blob/7c1dcfac003791a7fee733ed13851a5cac1ccf1c/packages/babel-core/src/config/full.ts#L257-L271) [packages/babel-core/src/config/helpers/config-api.ts#L84-120](https://github.com/babel/babel/blob/7c1dcfac003791a7fee733ed13851a5cac1ccf1c/packages/babel-core/src/config/helpers/config-api.ts#L84-L120)
- Inherited plugins chain pre/post/manipulateOptions hooks, merge inherited and local visitors, and propagate inherited external dependencies with cache invalidation. — [packages/babel-core/src/config/full.ts#L352-389](https://github.com/babel/babel/blob/7c1dcfac003791a7fee733ed13851a5cac1ccf1c/packages/babel-core/src/config/full.ts#L352-L389)
- PluginPass exposes per-pass Map state, file/options/cwd/filename/isAsync context, helper availability/insertion, and code-frame error construction. — [packages/babel-core/src/transformation/plugin-pass.ts#L4-35](https://github.com/babel/babel/blob/7c1dcfac003791a7fee733ed13851a5cac1ccf1c/packages/babel-core/src/transformation/plugin-pass.ts#L4-L35) [packages/babel-core/src/transformation/plugin-pass.ts#L38-59](https://github.com/babel/babel/blob/7c1dcfac003791a7fee733ed13851a5cac1ccf1c/packages/babel-core/src/transformation/plugin-pass.ts#L38-L59)
- Parser/generator overrides may decline by returning undefined, but multiple returned results or Promise results throw; otherwise Babel uses its default parser/generator. — [packages/babel-core/src/parser/index.ts#L16-44](https://github.com/babel/babel/blob/7c1dcfac003791a7fee733ed13851a5cac1ccf1c/packages/babel-core/src/parser/index.ts#L16-L44) [packages/babel-core/src/transformation/file/generate.ts#L20-48](https://github.com/babel/babel/blob/7c1dcfac003791a7fee733ed13851a5cac1ccf1c/packages/babel-core/src/transformation/file/generate.ts#L20-L48)
- Parser extensions compose ordered mixins for ESTree, JSX, Flow, TypeScript, V8 intrinsics, and placeholders; parser classes are cached by mixin names, and Flow/TypeScript cannot be combined. — [packages/babel-parser/src/plugin-utils.ts#L17-19](https://github.com/babel/babel/blob/7c1dcfac003791a7fee733ed13851a5cac1ccf1c/packages/babel-parser/src/plugin-utils.ts#L17-L19) [packages/babel-parser/src/plugin-utils.ts#L136-157](https://github.com/babel/babel/blob/7c1dcfac003791a7fee733ed13851a5cac1ccf1c/packages/babel-parser/src/plugin-utils.ts#L136-L157) [packages/babel-parser/src/index.ts#L138-160](https://github.com/babel/babel/blob/7c1dcfac003791a7fee733ed13851a5cac1ccf1c/packages/babel-parser/src/index.ts#L138-L160)
- Standalone exposes registerPlugin(s) and registerPreset(s); duplicate names warn and replace registry entries, and processOptions resolves user-supplied names against those registries. — [packages/babel-standalone/src/index.ts#L133-174](https://github.com/babel/babel/blob/7c1dcfac003791a7fee733ed13851a5cac1ccf1c/packages/babel-standalone/src/index.ts#L133-L174) [packages/babel-standalone/src/index.ts#L205-252](https://github.com/babel/babel/blob/7c1dcfac003791a7fee733ed13851a5cac1ccf1c/packages/babel-standalone/src/index.ts#L205-L252)
- CLI options extend through Commander declarations and babelOptions/cliOptions mapping; register worker functionality extends through the ACTIONS switch dispatching option, transform, ignore, and save requests. — [packages/babel-cli/src/babel/options.ts#L277-335](https://github.com/babel/babel/blob/7c1dcfac003791a7fee733ed13851a5cac1ccf1c/packages/babel-cli/src/babel/options.ts#L277-L335) [packages/babel-register/src/worker/handle-message.ts#L10-24](https://github.com/babel/babel/blob/7c1dcfac003791a7fee733ed13851a5cac1ccf1c/packages/babel-register/src/worker/handle-message.ts#L10-L24)

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)
