fix: omit packager assets from caching (#1438)

This commit is contained in:
Laurin Quast
2019-01-24 13:15:58 +01:00
committed by GitHub
parent 0a1605f11c
commit 125d5dc9c5
7 changed files with 87 additions and 30 deletions

View File

@@ -1,7 +1,19 @@
"use strict";
const path = require('path');
const blacklist = require('metro').createBlacklist;
const rootProjectDir = path.resolve(__dirname, '..', '..')
module.exports = {
// Resolve react-native-video from parent directory so we do not have to install react-native-video after each change applied
getBlacklistRE: function() {
return blacklist([/node_modules\/react-native-video\/examples\/.*/]);
return blacklist([/node_modules\/react-native-video\/.*/, new RegExp(`${rootProjectDir}/node_modules/react-native/.*`)])
},
getProjectRoots() {
return [
__dirname,
rootProjectDir
]
}
};
};