A tiny and flexible Babel preset for React development, combining @babel/preset-env and @babel/preset-react with sensible defaults. Version 0.4.3 is the latest stable release; the package is actively maintained but has limited community adoption. It simplifies configuration by wrapping two commonly used presets into one, supporting custom options for targets, modules, useBuiltIns, and runtime mode (classic or automatic). Compared to alternatives like babel-preset-react-app, this preset is more lightweight and configurable, suitable for projects that need a minimal Babel setup without opinionated defaults.
npm install babel-preset-oVerified import paths — ran on the pinned version, not inferred.
Shows how to install and configure babel-preset-o with custom targets and options for React development.
Use ['babel-preset-o', { ... }] in the presets array.Set runtime: 'automatic' in preset options if using React 17+ and the new JSX transform.
Consider removing useBuiltIns and installing core-js directly for polyfills.
npm install @babel/preset-env @babel/preset-react --save-dev
Use ['babel-preset-o', { modules: 'commonjs' }] instead of ['babel-preset-o', { modules: 'commonjs' }] (check nesting).Set runtime: 'automatic' or add import React from 'react' in every JSX file.