babel-plugin-transform-react-templates

JSON →
library 1.0.0 ·javascript deprecated
verified Jun 4, 2026

A Babel plugin (v1.0.0, no update cadence known) that transforms JSX files into self-registering templates by injecting a call to a global `register` function at the end of each module. It allows defining templates as standalone JSX files and importing them via a shared registry object. Differentiator: enables code-splitting of templates without explicit imports by using file-system conventions. Requires @babel/core >= 7.0.0. Deprecated in favor of modern patterns like dynamic imports and React.lazy.