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,
|
||||
assetRegistryPath: normalizedConfig.assetRegistryPath,
|
||||
blacklistRE: normalizedConfig.getBlacklistRE(),
|
||||
cacheStores: normalizedConfig.cacheStores,
|
||||
cacheVersion: normalizedConfig.cacheVersion,
|
||||
createModuleIdFactory: normalizedConfig.createModuleIdFactory,
|
||||
dynamicDepsInPackages: normalizedConfig.dynamicDepsInPackages,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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<CacheStore<TransformedCode>>,
|
||||
cacheVersion: string,
|
||||
createModuleIdFactory?: () => (path: string) => number,
|
||||
+dynamicDepsInPackages: DynamicRequiresBehavior,
|
||||
|
|
Loading…
Reference in New Issue