mirror of
https://github.com/status-im/metro.git
synced 2025-02-27 18:20:53 +00:00
[react-packager] Fix assetRoots when starting in node_modules
This commit is contained in:
parent
e2404cd3dd
commit
a895e62e6d
@ -68,9 +68,13 @@ if (options.assetRoots) {
|
||||
if (!Array.isArray(options.assetRoots)) {
|
||||
options.assetRoots = options.assetRoots.split(',');
|
||||
}
|
||||
} else {
|
||||
if (__dirname.match(/node_modules\/react-native\/packager$/)) {
|
||||
options.assetRoots = [path.resolve(__dirname, '../../..')];
|
||||
} else {
|
||||
options.assetRoots = [path.resolve(__dirname, '..')];
|
||||
}
|
||||
}
|
||||
|
||||
console.log('\n' +
|
||||
' ===============================================================\n' +
|
||||
|
Loading…
x
Reference in New Issue
Block a user