GT2/Ejectable/node_modules/babel-preset-fbjs
Ren Juan 06c1a5835d set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
..
plugins set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
CHANGELOG.md set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
LICENSE set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
README.md set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
configure.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
index.js set clean start from expo 4.10 2021-08-16 00:14:59 +00:00
package.json set clean start from expo 4.10 2021-08-16 00:14:59 +00:00

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
    }
  ]
});