Skip to content

Commit

Permalink
Expose getResolverMainFields() config param
Browse files Browse the repository at this point in the history
Reviewed By: mjesun

Differential Revision: D8380198

fbshipit-source-id: 3d5b7a5873095db2b90a23b5054fb94579df3f1a
  • Loading branch information
rafeca authored and facebook-github-bot committed Jun 12, 2018
1 parent e3c5524 commit 39d9d71
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions local-cli/bundle/buildBundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ async function buildBundle(
extraNodeModules: config.extraNodeModules,
getModulesRunBeforeMainModule: config.getModulesRunBeforeMainModule,
getPolyfills: config.getPolyfills,
getResolverMainFields: config.getResolverMainFields,
getRunModuleStatement: config.getRunModuleStatement,
getTransformOptions: config.getTransformOptions,
hasteImplModulePath: config.hasteImplModulePath,
Expand Down
1 change: 1 addition & 0 deletions local-cli/server/runServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ function getPackagerServer(args, config, reporter) {
dynamicDepsInPackages: config.dynamicDepsInPackages,
getModulesRunBeforeMainModule: config.getModulesRunBeforeMainModule,
getPolyfills: config.getPolyfills,
getResolverMainFields: config.getResolverMainFields,
getRunModuleStatement: config.getRunModuleStatement,
getTransformOptions: config.getTransformOptions,
hasteImplModulePath: config.hasteImplModulePath,
Expand Down
5 changes: 3 additions & 2 deletions local-cli/util/Config.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,12 @@ const Config = {
DEFAULT: ({
...MetroConfig.DEFAULT,
getBlacklistRE,
getProjectRoots,
getPolyfills,
getModulesRunBeforeMainModule: () => [
require.resolve('../../Libraries/Core/InitializeCore'),
],
getProjectRoots,
getPolyfills,
getResolverMainFields: () => ['react-native', 'browser', 'main'],
getTransformModulePath: () =>
require.resolve('metro/src/reactNativeTransformer'),
}: ConfigT),
Expand Down

0 comments on commit 39d9d71

Please sign in to comment.