diff --git a/local-cli/util/Config.js b/local-cli/util/Config.js index ac7e3bf2c..9fc4487fe 100644 --- a/local-cli/util/Config.js +++ b/local-cli/util/Config.js @@ -15,7 +15,7 @@ const getPolyfills = require('../../rn-get-polyfills'); const invariant = require('fbjs/lib/invariant'); const path = require('path'); -const {Config: MetroConfig} = require('metro'); +const {Config: MetroConfig, createBlacklist} = require('metro'); const RN_CLI_CONFIG = 'rn-cli.config.js'; @@ -54,6 +54,10 @@ const getProjectRoots = () => { return resolveSymlinksForRoots([getProjectPath()]); }; +const getBlacklistRE = () => { + return createBlacklist([/.*\/__fixtures__\/.*/]); +}; + /** * Module capable of getting the configuration out of a given file. * @@ -65,6 +69,7 @@ const getProjectRoots = () => { const Config = { DEFAULT: ({ ...MetroConfig.DEFAULT, + getBlacklistRE, getProjectRoots, getPolyfills, getModulesRunBeforeMainModule: () => [