metro-bundler: make internal tool to use the new source of thruth for packager/metro-bundler

Reviewed By: davidaurelio

Differential Revision: D5182904

fbshipit-source-id: df5de3a9eb85560a09789d0a94eccb5c48ecba7b
This commit is contained in:
Jean Lauliac 2017-06-06 05:08:27 -07:00 committed by Facebook Github Bot
parent e0bdb7cbcf
commit 328d8ddb47
4 changed files with 3 additions and 6 deletions

View File

@ -11,7 +11,7 @@
'use strict';
const babel = require('babel-core');
const babelRegisterOnly = require('../packager/src/babelRegisterOnly');
const babelRegisterOnly = require('metro-bundler/build/babelRegisterOnly');
const createCacheKeyFunction = require('fbjs-scripts/jest/createCacheKeyFunction');
const path = require('path');
@ -23,7 +23,7 @@ const nodeOptions = babelRegisterOnly.config([nodeFiles]);
babelRegisterOnly([]);
// has to be required after setting up babelRegisterOnly
const transformer = require('../packager/src/transformer.js');
const transformer = require('metro-bundler/build/transformer.js');
module.exports = {
process(src/*: string*/, file/*: string*/) {

View File

@ -8,7 +8,6 @@
*/
'use strict';
require('../../setupBabel')();
const ReactPackager = require('metro-bundler');
const denodeify = require('denodeify');

View File

@ -15,8 +15,6 @@ const getInverseDependencies = require('./getInverseDependencies');
const querystring = require('querystring');
const url = require('url');
import type Server from '../../../packager/src/Server';
import type Module from '../../../packager/src/node-haste/Module';
import type {ResolutionResponse} from './getInverseDependencies';
import type {Server as HTTPServer} from 'http';

View File

@ -9,7 +9,7 @@
'use strict';
const babelRegisterOnly = require('./packager/src/babelRegisterOnly');
const babelRegisterOnly = require('metro-bundler/build/babelRegisterOnly');
const escapeRegExp = require('lodash/escapeRegExp');
const path = require('path');