We’re excited to announce Bit’s new home at bit.dev!Learn more

get-babel-options

v0.0.3arrow_drop_down
v0.0.3
v0.0.2
v0.0.1
STATUS
Passing
DOWNLOADS
60
LICENSE
MIT
VISIBILITY
Public
PUBLISHED
A year ago
subject
Retrieves the babel options from the `.babelrc` file as JSON from the specified directory.
1 contributor
Like
Use get-babel-options in your project ?
Copied
npm i @bit/bit.envs.utils.get-babel-options
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.dev
Component Example
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
const babelOptions = getBabelOptions(); babel.transform( code, babelOptions, distPath
modified
chevron_left
chevron_right
getBabelOptions (
pathToLook:string
)

Retrieves the babel options from the .babelrc file as JSON from the specified directory.

Example
const babelOptions = getBabelOptions();
babel.transform(code, babelOptions, distPath);
Argument
pathToLook: string