Merge pull request #937 from leoilab/fix-example

Fix example failing with "Unable to resolve module react"
This commit is contained in:
Sibelius Seraphini 2017-12-07 10:39:15 -02:00 committed by GitHub
commit 087c6c1adf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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),
};