diff --git a/packages/metro/src/index.js b/packages/metro/src/index.js index 7f1ec336..3162cad8 100644 --- a/packages/metro/src/index.js +++ b/packages/metro/src/index.js @@ -119,6 +119,7 @@ async function runMetro({ assetExts: normalizedConfig.assetTransforms ? [] : assetExts, assetRegistryPath: normalizedConfig.assetRegistryPath, blacklistRE: normalizedConfig.getBlacklistRE(), + cacheStores: normalizedConfig.cacheStores, cacheVersion: normalizedConfig.cacheVersion, createModuleIdFactory: normalizedConfig.createModuleIdFactory, dynamicDepsInPackages: normalizedConfig.dynamicDepsInPackages, diff --git a/packages/metro/src/legacy.js b/packages/metro/src/legacy.js index dc2d42b6..02450ff1 100644 --- a/packages/metro/src/legacy.js +++ b/packages/metro/src/legacy.js @@ -173,6 +173,7 @@ function toServerOptions(options: Options): ServerOptions { assetRegistryPath: options.assetRegistryPath, asyncRequireModulePath: options.asyncRequireModulePath, blacklistRE: options.blacklistRE, + cacheStores: options.cacheStores, cacheVersion: options.cacheVersion, dynamicDepsInPackages: options.dynamicDepsInPackages, enableBabelRCLookup: options.enableBabelRCLookup, diff --git a/packages/metro/src/shared/types.flow.js b/packages/metro/src/shared/types.flow.js index 2051dfa3..4c776432 100644 --- a/packages/metro/src/shared/types.flow.js +++ b/packages/metro/src/shared/types.flow.js @@ -15,11 +15,15 @@ import type { PostProcessBundleSourcemap, } from '../Bundler'; import type {PostProcessModules} from '../DeltaBundler'; -import type {CustomTransformOptions} from '../JSTransformer/worker'; +import type { + CustomTransformOptions, + TransformedCode, +} from '../JSTransformer/worker'; import type {DynamicRequiresBehavior} from '../ModuleGraph/worker/collectDependencies'; import type {GlobalTransformCache} from '../lib/GlobalTransformCache'; import type {TransformCache} from '../lib/TransformCaching'; import type {Reporter} from '../lib/reporting'; +import type {CacheStore} from 'metro-cache'; import type { MetroSourceMap, MetroSourceMapSegmentTuple, @@ -73,6 +77,7 @@ export type Options = {| +asyncRequireModulePath?: string, +assetRegistryPath: string, blacklistRE?: RegExp, + cacheStores: $ReadOnlyArray>, cacheVersion: string, createModuleIdFactory?: () => (path: string) => number, +dynamicDepsInPackages: DynamicRequiresBehavior,