mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 19:26:42 +08:00
feat(webpack): support tsconfig.app.json when present (#10221)
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
import { existsSync } from 'fs';
|
||||
import { resolve } from 'path';
|
||||
|
||||
export function getProjectRootPath(): string {
|
||||
@ -30,6 +31,13 @@ export function getProjectFilePath(filePath: string): string {
|
||||
return resolve(getProjectRootPath(), filePath);
|
||||
}
|
||||
|
||||
export function getProjectTSConfigPath(): string | undefined {
|
||||
return [
|
||||
getProjectFilePath('tsconfig.app.json'),
|
||||
getProjectFilePath('tsconfig.json'),
|
||||
].find((path) => existsSync(path));
|
||||
}
|
||||
|
||||
// unused helper, but keeping it here as we may need it
|
||||
// todo: remove if unused for next few releases
|
||||
// function findFile(fileName, currentDir): string | null {
|
||||
|
Reference in New Issue
Block a user