Utility to create a modified Babel preset by cloning an existing preset and applying plugin additions, removals, or configuration overrides. Current version 3.2.1. Helps avoid manual preset duplication by flattening nested presets into a single plugin list and applying transformations. Key differentiator: plugin filtering works on resolved filenames for precise matching. Works best with npm 3. Release cadence: sporadic, last release 2017.
npm install modify-babel-presetVerified import paths — ran on the pinned version, not inferred.
Creates a modified preset by removing the typeof-symbol transform and adding the React JSX transform to the es2015 preset.
Ensure plugin names in the modifications object match the resolved filename (short name works, but avoid full relative paths).
Run 'npm install <preset-name>' before using modify-babel-preset.
Verify the final plugin order and configuration matches expectations, especially for presets that depend on ordering.
Consider using babel-preset-env or write your own preset programmatically.
npm install <preset-name> --save-dev
Use the correct plugin name (e.g., 'transform-react-jsx' or 'babel-plugin-transform-react-jsx').
modifyBabelPreset('es2015', {...})No dependency data recorded yet.