feat(webpack): using new nativescript.config (#8796)

This commit is contained in:
Nathan Walker
2020-08-27 19:43:42 -07:00
committed by GitHub
parent fa9f0957b8
commit 33a703e129
6 changed files with 14 additions and 2 deletions

View File

@ -88,7 +88,15 @@ const getIndentationCharacter = (jsonContent) => {
const getProjectDir = hook.findProjectDir;
const getPackageJsonPath = projectDir => resolve(projectDir, "package.json");
const getPackageJsonPath = projectDir => {
const packagePath = resolve(projectDir, "package.json");
if (fs.existsSync(packagePath)) {
return packagePath;
} else {
return getPackageJsonPath(resolve(projectDir, '..'));
}
}
const getNsConfigPath = projectDir => resolve(projectDir, "nsconfig.json");
const isAndroid = platform => /android/i.test(platform);