Fix example failing with "Unable to resolve module react"
This commit is contained in:
parent
4b4160801e
commit
4f4aaf9a02
|
@ -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),
|
||||
};
|
Loading…
Reference in New Issue