diff --git a/local-cli/bundle/buildBundle.js b/local-cli/bundle/buildBundle.js index 9bc0e9225..bcb496cad 100644 --- a/local-cli/bundle/buildBundle.js +++ b/local-cli/bundle/buildBundle.js @@ -16,7 +16,6 @@ const Server = require('metro/src/Server'); /* $FlowFixMe(site=react_native_oss) */ const outputBundle = require('metro/src/shared/output/bundle'); -const {convert} = require('metro-config'); const path = require('path'); const saveAssets = require('./saveAssets'); @@ -57,9 +56,7 @@ async function buildBundle( platform: args.platform, }; - const {serverOptions} = convert.convertNewToOld(config); - - const server = new Server(serverOptions); + const server = new Server(config); try { const bundle = await output.build(server, requestOpts); diff --git a/local-cli/dependencies/dependencies.js b/local-cli/dependencies/dependencies.js index b3058a165..619154807 100644 --- a/local-cli/dependencies/dependencies.js +++ b/local-cli/dependencies/dependencies.js @@ -10,7 +10,6 @@ 'use strict'; const Metro = require('metro'); -const {convert} = require('metro-config'); const denodeify = require('denodeify'); const fs = require('fs'); @@ -48,12 +47,10 @@ async function dependencies(argv, configPromise, args, packagerInstance) { ? fs.createWriteStream(args.output) : process.stdout; - const {serverOptions} = convert.convertNewToOld(config); - return Promise.resolve( (packagerInstance ? packagerInstance.getOrderedDependencyPaths(options) - : Metro.getOrderedDependencyPaths(serverOptions, options) + : Metro.getOrderedDependencyPaths(config, options) ).then(deps => { deps.forEach(modulePath => { // Temporary hack to disable listing dependencies not under this directory. diff --git a/local-cli/server/runServer.js b/local-cli/server/runServer.js index b84906094..784cc0cc5 100644 --- a/local-cli/server/runServer.js +++ b/local-cli/server/runServer.js @@ -60,8 +60,7 @@ async function runServer(args: Args, config: ConfigT) { config.server.enhanceMiddleware = middleware => middlewareManager.getConnectInstance().use(middleware); - const serverInstance = await Metro.runServer({ - config, + const serverInstance = await Metro.runServer(config, { host: args.host, secure: args.https, secureCert: args.cert,