Skip to content

Commit

Permalink
[react-packager] Fix assetRoots when starting in node_modules, fixes f…
Browse files Browse the repository at this point in the history
  • Loading branch information
amasad committed Mar 27, 2015
1 parent 71f08d2 commit fc52ed6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packager/packager.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' +
Expand Down

0 comments on commit fc52ed6

Please sign in to comment.