Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
plugins
.gitignore
.npmignore
CHANGELOG.md
LICENSE
README.md
configure.js
index.js
package.json
yarn.lock

README.md

babel-preset-fbjs

Babel preset for Facebook projects.

Install

$ npm install --save-dev babel-preset-fbjs

Basic Usage

Via .babelrc

.babelrc

{
  "presets": ["fbjs"]
}

Via CLI

$ babel script.js --presets fbjs

Via Node API

require('@babel/core').transform('code', {
  presets: ['fbjs']
});

Advanced Usage

require('@babel/core').transform('code', {
  presets: [
    require('babel-preset-fbjs/configure')({
      autoImport: true,
      inlineRequires: false,
      rewriteModules: {},
      stripDEV: false
    }
  ]
});