Fix example failing with "Unable to resolve module react"

This commit is contained in:
skovhus 2017-10-06 14:38:36 +02:00
parent 4b4160801e
commit 4f4aaf9a02
1 changed files with 12 additions and 0 deletions

12
Example/rn-cli.config.js Normal file
View File

@ -0,0 +1,12 @@
const path = require('path');
// As the metro bundler does not support linking correctly, we add additional
// search path queries to all modules.
// See https://github.com/facebook/metro-bundler/issues/68
const extraNodeModulesGetter = {
get: (target, name) => path.join(process.cwd(), `node_modules/${name}`),
};
module.exports = {
extraNodeModules: new Proxy({}, extraNodeModulesGetter),
};