A Babel preset that replaces React.createElement and React.createFragment with shorter local variable aliases (__jsx, __jsxFrag) to reduce minified bundle size. Current stable version is 1.0.0. This preset is a drop-in replacement for @babel/preset-react, offering a ~10% size reduction on typical React components. It is designed for production builds where every byte counts, but note that it reserves the variable names __jsx and __jsxFrag. The preset relies on @babel/core as a peer dependency and has no other dependencies. It is compatible with React JSX transforms and can be customized via pragma and pragmaFrag options.
npm install babel-preset-react-optimisedNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Configures babel-preset-react-optimised in babel.config.js, shows installation and basic build command.
Use 'pragmaAs' and 'pragmaFragAs' options to rename them (e.g., pragmaAs: 'h').
npm install --save-dev @babel/core
Ensure babel-preset-react-optimised is in your Babel presets list.
No dependency data recorded yet.