Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion lib/BrowserifyCache.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ function BrowserifyCache(b, opts) {

// load cache from file specified by cacheFile opt
var cacheFile = opts.cacheFile || opts.cachefile || b._options && b._options.cacheFile || null;
var cacheData = loadCacheData(b, cacheFile);
var cacheData;
if (cacheFile) {
cacheData = loadCacheData(b, cacheFile);
} else {
cacheData = opts.packageCache || b._options && b._options.packageCache;
}

// b._options.cache is a shared object into which loaded module cache is merged.
// it will be reused for each build, and mutated when the cache is invalidated.
Expand Down