mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-03-28 22:46:52 +08:00
Merge pull request #286 from facebook/assetRoots
[react-packager] Fix assetRoots when starting in node_modules,
This commit is contained in:
@@ -69,7 +69,11 @@ if (options.assetRoots) {
|
||||
options.assetRoots = options.assetRoots.split(',');
|
||||
}
|
||||
} else {
|
||||
options.assetRoots = [path.resolve(__dirname, '..')];
|
||||
if (__dirname.match(/node_modules\/react-native\/packager$/)) {
|
||||
options.assetRoots = [path.resolve(__dirname, '../../..')];
|
||||
} else {
|
||||
options.assetRoots = [path.resolve(__dirname, '..')];
|
||||
}
|
||||
}
|
||||
|
||||
console.log('\n' +
|
||||
|
||||
Reference in New Issue
Block a user