mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-23 20:01:01 +08:00
Replace projectRoots with projectRoot + watchRoots
Summary: We use projectRoots to limit crawling of jest-haste-map in large codebases. Since this implies multiple projects roots, it makes it very hard (or impossible) to reliably cache dependency resolutions. If we can replace this with a single project root and a set of watch roots, we can have relative path resolutions for all dependencies which van be cached. Reviewed By: rafeca Differential Revision: D8450498 fbshipit-source-id: 830c21e847c3236e42d5414a8587508cb73864bd
This commit is contained in:
committed by
Facebook Github Bot
parent
d7e0fe2c2c
commit
c5ce762697
@@ -75,7 +75,6 @@ async function buildBundle(
|
||||
: defaultProvidesModuleNodeModules;
|
||||
|
||||
const terminal = new Terminal(process.stdout);
|
||||
|
||||
const server = new Server({
|
||||
asyncRequireModulePath: config.getAsyncRequireModulePath(),
|
||||
assetExts: defaultAssetExts.concat(assetExts),
|
||||
@@ -96,7 +95,7 @@ async function buildBundle(
|
||||
platforms: defaultPlatforms.concat(platforms),
|
||||
postMinifyProcess: config.postMinifyProcess,
|
||||
postProcessBundleSourcemap: config.postProcessBundleSourcemap,
|
||||
projectRoots: config.getProjectRoots(),
|
||||
projectRoot: config.getProjectRoot(),
|
||||
providesModuleNodeModules: providesModuleNodeModules,
|
||||
reporter: new TerminalReporter(terminal),
|
||||
resetCache: args.resetCache,
|
||||
@@ -104,6 +103,7 @@ async function buildBundle(
|
||||
sourceExts: sourceExts.concat(defaultSourceExts),
|
||||
transformModulePath: transformModulePath,
|
||||
watch: false,
|
||||
watchFolders: config.getWatchFolders(),
|
||||
workerPath: config.getWorkerPath && config.getWorkerPath(),
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user