diff --git a/packages/metro-bundler/src/ModuleGraph/ModuleGraph.js b/packages/metro-bundler/src/ModuleGraph/ModuleGraph.js index b26eca8e..757fe16f 100644 --- a/packages/metro-bundler/src/ModuleGraph/ModuleGraph.js +++ b/packages/metro-bundler/src/ModuleGraph/ModuleGraph.js @@ -52,7 +52,7 @@ exports.createBuildSetup = ( parallel({ graph: cb => graphWithOptions( - concat(defaults.runBeforeMainModule, entryPoints), + entryPoints, cb, ), moduleSystem: cb => graphOnlyModules( diff --git a/packages/metro-bundler/src/ModuleGraph/__tests__/ModuleGraph-test.js b/packages/metro-bundler/src/ModuleGraph/__tests__/ModuleGraph-test.js index d183feeb..4a3844c9 100644 --- a/packages/metro-bundler/src/ModuleGraph/__tests__/ModuleGraph-test.js +++ b/packages/metro-bundler/src/ModuleGraph/__tests__/ModuleGraph-test.js @@ -70,16 +70,6 @@ describe('build setup', () => { }); }); - it('places all modules from `defaults.runBeforeMainModule` after the polyfills', done => { - buildSetup(noEntryPoints, noOptions, (error, result) => { - const additionalModules = - Array.from(result.modules).slice(-defaults.runBeforeMainModule.length); - expect(additionalModules) - .toEqual(defaults.runBeforeMainModule.map(moduleFromPath)); - done(); - }); - }); - it('places all entry points at the end', done => { const entryPoints = ['a', 'b', 'c']; buildSetup(entryPoints, noOptions, (error, result) => { @@ -88,15 +78,6 @@ describe('build setup', () => { done(); }); }); - - it('concatenates `runBeforeMainModule` and entry points as `entryModules`', done => { - const entryPoints = ['a', 'b', 'c']; - buildSetup(entryPoints, noOptions, (error, result) => { - expect(Array.from(result.entryModules)).toEqual( - defaults.runBeforeMainModule.concat(entryPoints).map(moduleFromPath)); - done(); - }); - }); }); function moduleFromPath(path) {