mirror of https://github.com/status-im/metro.git
Allow project-specific config for RN CLI using providesModuleNodeModules
Reviewed By: davidaurelio Differential Revision: D4409046 fbshipit-source-id: 5af0d08542935a784f4737653ccac49fd7517aff
This commit is contained in:
parent
ae6cd177de
commit
66714e45da
|
@ -74,6 +74,7 @@ type Options = {
|
||||||
platforms: Array<string>,
|
platforms: Array<string>,
|
||||||
polyfillModuleNames: Array<string>,
|
polyfillModuleNames: Array<string>,
|
||||||
projectRoots: Array<string>,
|
projectRoots: Array<string>,
|
||||||
|
providesModuleNodeModules?: Array<string>,
|
||||||
reporter: Reporter,
|
reporter: Reporter,
|
||||||
resetCache: boolean,
|
resetCache: boolean,
|
||||||
transformModulePath?: string,
|
transformModulePath?: string,
|
||||||
|
@ -154,6 +155,7 @@ class Bundler {
|
||||||
platforms: opts.platforms,
|
platforms: opts.platforms,
|
||||||
polyfillModuleNames: opts.polyfillModuleNames,
|
polyfillModuleNames: opts.polyfillModuleNames,
|
||||||
projectRoots: opts.projectRoots,
|
projectRoots: opts.projectRoots,
|
||||||
|
providesModuleNodeModules: opts.providesModuleNodeModules,
|
||||||
reporter: opts.reporter,
|
reporter: opts.reporter,
|
||||||
resetCache: opts.resetCache,
|
resetCache: opts.resetCache,
|
||||||
transformCacheKey,
|
transformCacheKey,
|
||||||
|
|
|
@ -36,6 +36,7 @@ type Options = {
|
||||||
platforms: Array<string>,
|
platforms: Array<string>,
|
||||||
polyfillModuleNames?: Array<string>,
|
polyfillModuleNames?: Array<string>,
|
||||||
projectRoots: Array<string>,
|
projectRoots: Array<string>,
|
||||||
|
providesModuleNodeModules?: Array<string>,
|
||||||
reporter: Reporter,
|
reporter: Reporter,
|
||||||
resetCache: boolean,
|
resetCache: boolean,
|
||||||
transformCacheKey: string,
|
transformCacheKey: string,
|
||||||
|
@ -65,7 +66,7 @@ class Resolver {
|
||||||
},
|
},
|
||||||
platforms: opts.platforms,
|
platforms: opts.platforms,
|
||||||
preferNativePlatform: true,
|
preferNativePlatform: true,
|
||||||
providesModuleNodeModules: defaults.providesModuleNodeModules,
|
providesModuleNodeModules: opts.providesModuleNodeModules || defaults.providesModuleNodeModules,
|
||||||
reporter: opts.reporter,
|
reporter: opts.reporter,
|
||||||
resetCache: opts.resetCache,
|
resetCache: opts.resetCache,
|
||||||
roots: opts.projectRoots,
|
roots: opts.projectRoots,
|
||||||
|
|
|
@ -63,6 +63,7 @@ type Options = {
|
||||||
platforms?: Array<string>,
|
platforms?: Array<string>,
|
||||||
polyfillModuleNames?: Array<string>,
|
polyfillModuleNames?: Array<string>,
|
||||||
projectRoots: Array<string>,
|
projectRoots: Array<string>,
|
||||||
|
providesModuleNodeModules?: Array<string>,
|
||||||
reporter: Reporter,
|
reporter: Reporter,
|
||||||
resetCache?: boolean,
|
resetCache?: boolean,
|
||||||
silent?: boolean,
|
silent?: boolean,
|
||||||
|
@ -178,6 +179,7 @@ class Server {
|
||||||
platforms: Array<string>,
|
platforms: Array<string>,
|
||||||
polyfillModuleNames: Array<string>,
|
polyfillModuleNames: Array<string>,
|
||||||
projectRoots: Array<string>,
|
projectRoots: Array<string>,
|
||||||
|
providesModuleNodeModules?: Array<string>,
|
||||||
reporter: Reporter,
|
reporter: Reporter,
|
||||||
resetCache: boolean,
|
resetCache: boolean,
|
||||||
silent: boolean,
|
silent: boolean,
|
||||||
|
@ -209,6 +211,7 @@ class Server {
|
||||||
platforms: options.platforms || defaults.platforms,
|
platforms: options.platforms || defaults.platforms,
|
||||||
polyfillModuleNames: options.polyfillModuleNames || [],
|
polyfillModuleNames: options.polyfillModuleNames || [],
|
||||||
projectRoots: options.projectRoots,
|
projectRoots: options.projectRoots,
|
||||||
|
providesModuleNodeModules: options.providesModuleNodeModules,
|
||||||
reporter: options.reporter,
|
reporter: options.reporter,
|
||||||
resetCache: options.resetCache || false,
|
resetCache: options.resetCache || false,
|
||||||
silent: options.silent || false,
|
silent: options.silent || false,
|
||||||
|
|
Loading…
Reference in New Issue