diff --git a/jest/preprocessor.js b/jest/preprocessor.js index af38b1a73..74a574016 100644 --- a/jest/preprocessor.js +++ b/jest/preprocessor.js @@ -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*/) { diff --git a/local-cli/dependencies/dependencies.js b/local-cli/dependencies/dependencies.js index e7c07fd94..5c47721f2 100644 --- a/local-cli/dependencies/dependencies.js +++ b/local-cli/dependencies/dependencies.js @@ -8,7 +8,6 @@ */ 'use strict'; -require('../../setupBabel')(); const ReactPackager = require('metro-bundler'); const denodeify = require('denodeify'); diff --git a/local-cli/server/util/attachHMRServer.js b/local-cli/server/util/attachHMRServer.js index e27b3c182..da80fcdef 100644 --- a/local-cli/server/util/attachHMRServer.js +++ b/local-cli/server/util/attachHMRServer.js @@ -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'; diff --git a/setupBabel.js b/setupBabel.js index 23741c5ea..ed3ff5bc5 100644 --- a/setupBabel.js +++ b/setupBabel.js @@ -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');