Remove things that contain absolute paths

Reviewed By: rafeca

Differential Revision: D7306933

fbshipit-source-id: 497b0f6f71243180870a297d6ea8b09164112649
This commit is contained in:
Miguel Jimenez Esun 2018-03-19 05:11:07 -07:00 committed by Facebook Github Bot
parent b581a3e2bb
commit 21ccd2b269
1 changed files with 10 additions and 12 deletions

View File

@ -121,6 +121,14 @@ class Bundler {
constructor(opts: Options) {
opts.projectRoots.forEach(verifyRootExists);
const getTransformCacheKey = getTransformCacheKeyFn({
asyncRequireModulePath: opts.asyncRequireModulePath,
cacheVersion: opts.cacheVersion,
dynamicDepsInPackages: opts.dynamicDepsInPackages,
projectRoots: opts.projectRoots,
transformModulePath: opts.transformModulePath,
});
this._opts = opts;
this._cache = opts.cacheStores.length ? new Cache(opts.cacheStores) : null;
@ -147,13 +155,7 @@ class Bundler {
experimentalCaches: !!opts.cacheStores.length,
extraNodeModules: opts.extraNodeModules,
getPolyfills: opts.getPolyfills,
getTransformCacheKey: getTransformCacheKeyFn({
asyncRequireModulePath: opts.asyncRequireModulePath,
cacheVersion: opts.cacheVersion,
dynamicDepsInPackages: opts.dynamicDepsInPackages,
projectRoots: opts.projectRoots,
transformModulePath: opts.transformModulePath,
}),
getTransformCacheKey,
globalTransformCache: opts.globalTransformCache,
hasteImplModulePath: opts.hasteImplModulePath,
maxWorkers: opts.maxWorkers,
@ -173,11 +175,7 @@ class Bundler {
this._baseHash = stableHash([
opts.assetExts,
opts.assetRegistryPath,
opts.asyncRequireModulePath,
opts.cacheVersion,
opts.dynamicDepsInPackages,
opts.projectRoots,
opts.transformModulePath,
getTransformCacheKey,
]).toString('binary');
this._projectRoots = opts.projectRoots;