Utility to find and parse the closest Babel configuration file (`.babelrc`, `.babelrc.js`, `babel.config.js`, or `babel` in `package.json`) by walking up directories. Version 1.1.0 is the latest stable release, with sporadic updates and no active development cadence. It supports both async and sync APIs, returns the parsed config and file path. Compared to similar tools like `find-up` combined with `cosmiconfig`, this package provides a simpler, focused API for Babel config lookup. Requires Node >=10.
npm install read-babelrc-upVerified import paths — ran on the pinned version, not inferred.
Demonstrates both async and sync APIs for finding and parsing the closest Babel config.
Consider using @babel/core's loadPartialConfig or cosmiconfig instead.
Use a more comprehensive config loader like cosmiconfig with babel preset.
Ensure Node.js >=10 is used (current engine requirement).
Run `npm install read-babelrc-up` or check your module path.
Use require() instead of import, or use dynamic import() with .mjs extension.
Use const sync = require('read-babelrc-up').sync; or call readBabelrcUp.sync() directly.