Use exactly the same way babel-core does to load .babelrc
MIT License
# this requires babel-core as peer dependency
yarn add babel-load-config babel-core
const loadConfig = require('babel-load-config')
const buildConfigChain = require('babel-core/lib/transformation/file/options/build-config-chain')
const config = loadConfig(process.cwd(), buildConfigChain)
//=> {loc: '/User/name/dir/.babelrc', options: {presets: []}}
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
babel-load-config © egoist, Released under the MIT License. Authored and maintained by egoist with help from contributors (list).
egoistian.com · GitHub @egoist · Twitter @rem_rin_rin