Ignore some irrelevant URL params in order to calculate the bundle cache

Reviewed By: davidaurelio

Differential Revision: D6086420

fbshipit-source-id: 52c1d5dc53d23b3963e663f4033446344b892659
This commit is contained in:
Rafael Oleza 2017-10-18 12:10:09 -07:00 committed by Facebook Github Bot
parent e9d2575b26
commit 941b25a2ca
1 changed files with 9 additions and 2 deletions

View File

@ -608,8 +608,15 @@ class Server {
}
optionsHash(options: {}) {
// onProgress is a function, can't be serialized
return JSON.stringify(Object.assign({}, options, {onProgress: null}));
// List of option parameters that won't affect the build result, so they
// can be ignored to calculate the options hash.
const ignoredParams = {
onProgress: null,
excludeSource: null,
sourceMapUrl: null,
};
return JSON.stringify(Object.assign({}, options, ignoredParams));
}
/**