JSPM

babel-load-config

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 581
  • Score
    100M100P100Q93434F
  • License MIT

Use exactly the same way babel-core does to load .babelrc

Package Exports

  • babel-load-config

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (babel-load-config) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

babel-load-config

NPM version NPM downloads Build Status donate

Install

# this requires babel-core as peer dependency
yarn add babel-load-config babel-core

Usage

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: []}}

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

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