diff --git a/packages/metro-bundler/src/ModuleGraph/output/__tests__/multiple-files-ram-bundle-test.js b/packages/metro-bundler/src/ModuleGraph/output/__tests__/multiple-files-ram-bundle-test.js index 2cbe51fa..79152eea 100644 --- a/packages/metro-bundler/src/ModuleGraph/output/__tests__/multiple-files-ram-bundle-test.js +++ b/packages/metro-bundler/src/ModuleGraph/output/__tests__/multiple-files-ram-bundle-test.js @@ -70,9 +70,11 @@ it('creates a source map', () => { it('creates a magic file with the number', () => { expect(extraFiles).toBeDefined(); // $FlowFixMe "extraFiles" is always defined at this point. - expect(extraFiles.get('UNBUNDLE')).toBeDefined(); + expect(extraFiles.get('js-modules/UNBUNDLE')).toBeDefined(); // $FlowFixMe "extraFiles" is always defined at this point. - expect(extraFiles.get('UNBUNDLE').readUInt32LE(0)).toBe(0xfb0bd1e5); + expect(extraFiles.get('js-modules/UNBUNDLE').readUInt32LE(0)).toBe( + 0xfb0bd1e5, + ); }); it('bundles each file separately', () => { diff --git a/packages/metro-bundler/src/ModuleGraph/output/multiple-files-ram-bundle.js b/packages/metro-bundler/src/ModuleGraph/output/multiple-files-ram-bundle.js index 8063931d..711067c8 100644 --- a/packages/metro-bundler/src/ModuleGraph/output/multiple-files-ram-bundle.js +++ b/packages/metro-bundler/src/ModuleGraph/output/multiple-files-ram-bundle.js @@ -50,7 +50,10 @@ function asMultipleFilesRamBundle({ // Prepare and write magic number file. magicFileContents.writeUInt32LE(MAGIC_UNBUNDLE_NUMBER, 0); - extraFiles.set(MAGIC_UNBUNDLE_FILENAME, magicFileContents); + extraFiles.set( + path.join(JS_MODULES, MAGIC_UNBUNDLE_FILENAME), + magicFileContents, + ); // Create the source map (with no module groups, as they are ignored). const map = buildSourceMapWithMetaData({