How to use the metro-babel-register.buildRegExps function in metro-babel-register

To help you get started, we’ve selected a few metro-babel-register examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github facebook / metro / packages / metro-visualizer / src / middleware / build-utils / transformWorker.js View on Github external
* LICENSE file in the root directory of this source tree.
 *
 * @emails oncall+metro_bundler
 * @format
 */

'use strict';

const babelRegister = require('metro-babel-register');
const path = require('path');

const rootPath = path.resolve(
  path.dirname(require.resolve('metro/package.json')),
  '../../..',
);
babelRegister(babelRegister.buildRegExps(rootPath, ['metro/packages/']));

module.exports = require('metro/src/DeltaBundler/Worker');
github react-native-community / cli / packages / local-cli / util / setupBabel.js View on Github external
function setupBabel() {
  babelRegisterOnly(
    babelRegisterOnly.buildRegExps(__dirname, BABEL_ENABLED_PATHS),
  );
}
github facebook / react-native / setupBabel.js View on Github external
function setupBabel() {
  babelRegisterOnly(
    babelRegisterOnly.buildRegExps(__dirname, BABEL_ENABLED_PATHS),
  );
}

metro-babel-register

🚇 babel/register configuration for Metro.

MIT
Latest version published 25 days ago

Package Health Score

98 / 100
Full package analysis