[React Native][Packager] allow --assetRoots to be relative paths

This commit is contained in:
Philipp von Weitershausen 2015-06-22 12:58:12 -07:00
parent bc1f94b7b2
commit fca872fac2
1 changed files with 3 additions and 1 deletions

View File

@ -86,7 +86,9 @@ if (options.root) {
if (options.assetRoots) { if (options.assetRoots) {
if (!Array.isArray(options.assetRoots)) { if (!Array.isArray(options.assetRoots)) {
options.assetRoots = options.assetRoots.split(','); options.assetRoots = options.assetRoots.split(',').map(function (dir) {
return path.resolve(process.cwd(), dir);
});
} }
} else { } else {
if (__dirname.match(/node_modules\/react-native\/packager$/)) { if (__dirname.match(/node_modules\/react-native\/packager$/)) {