mirror of https://github.com/status-im/metro.git
Allow passing custom configs through the CLI ("js1 run")
Reviewed By: jeanlauliac Differential Revision: D7081913 fbshipit-source-id: f5952599c840f2c65213bd2928b21f0c1d84f510
This commit is contained in:
parent
d83903f614
commit
8292958c00
|
@ -119,6 +119,7 @@ async function runMetro({
|
||||||
assetExts: normalizedConfig.assetTransforms ? [] : assetExts,
|
assetExts: normalizedConfig.assetTransforms ? [] : assetExts,
|
||||||
assetRegistryPath: normalizedConfig.assetRegistryPath,
|
assetRegistryPath: normalizedConfig.assetRegistryPath,
|
||||||
blacklistRE: normalizedConfig.getBlacklistRE(),
|
blacklistRE: normalizedConfig.getBlacklistRE(),
|
||||||
|
cacheStores: normalizedConfig.cacheStores,
|
||||||
cacheVersion: normalizedConfig.cacheVersion,
|
cacheVersion: normalizedConfig.cacheVersion,
|
||||||
createModuleIdFactory: normalizedConfig.createModuleIdFactory,
|
createModuleIdFactory: normalizedConfig.createModuleIdFactory,
|
||||||
dynamicDepsInPackages: normalizedConfig.dynamicDepsInPackages,
|
dynamicDepsInPackages: normalizedConfig.dynamicDepsInPackages,
|
||||||
|
|
|
@ -173,6 +173,7 @@ function toServerOptions(options: Options): ServerOptions {
|
||||||
assetRegistryPath: options.assetRegistryPath,
|
assetRegistryPath: options.assetRegistryPath,
|
||||||
asyncRequireModulePath: options.asyncRequireModulePath,
|
asyncRequireModulePath: options.asyncRequireModulePath,
|
||||||
blacklistRE: options.blacklistRE,
|
blacklistRE: options.blacklistRE,
|
||||||
|
cacheStores: options.cacheStores,
|
||||||
cacheVersion: options.cacheVersion,
|
cacheVersion: options.cacheVersion,
|
||||||
dynamicDepsInPackages: options.dynamicDepsInPackages,
|
dynamicDepsInPackages: options.dynamicDepsInPackages,
|
||||||
enableBabelRCLookup: options.enableBabelRCLookup,
|
enableBabelRCLookup: options.enableBabelRCLookup,
|
||||||
|
|
|
@ -15,11 +15,15 @@ import type {
|
||||||
PostProcessBundleSourcemap,
|
PostProcessBundleSourcemap,
|
||||||
} from '../Bundler';
|
} from '../Bundler';
|
||||||
import type {PostProcessModules} from '../DeltaBundler';
|
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 {DynamicRequiresBehavior} from '../ModuleGraph/worker/collectDependencies';
|
||||||
import type {GlobalTransformCache} from '../lib/GlobalTransformCache';
|
import type {GlobalTransformCache} from '../lib/GlobalTransformCache';
|
||||||
import type {TransformCache} from '../lib/TransformCaching';
|
import type {TransformCache} from '../lib/TransformCaching';
|
||||||
import type {Reporter} from '../lib/reporting';
|
import type {Reporter} from '../lib/reporting';
|
||||||
|
import type {CacheStore} from 'metro-cache';
|
||||||
import type {
|
import type {
|
||||||
MetroSourceMap,
|
MetroSourceMap,
|
||||||
MetroSourceMapSegmentTuple,
|
MetroSourceMapSegmentTuple,
|
||||||
|
@ -73,6 +77,7 @@ export type Options = {|
|
||||||
+asyncRequireModulePath?: string,
|
+asyncRequireModulePath?: string,
|
||||||
+assetRegistryPath: string,
|
+assetRegistryPath: string,
|
||||||
blacklistRE?: RegExp,
|
blacklistRE?: RegExp,
|
||||||
|
cacheStores: $ReadOnlyArray<CacheStore<TransformedCode>>,
|
||||||
cacheVersion: string,
|
cacheVersion: string,
|
||||||
createModuleIdFactory?: () => (path: string) => number,
|
createModuleIdFactory?: () => (path: string) => number,
|
||||||
+dynamicDepsInPackages: DynamicRequiresBehavior,
|
+dynamicDepsInPackages: DynamicRequiresBehavior,
|
||||||
|
|
Loading…
Reference in New Issue