fix: allow users to pass in absolute paths to ngc (#10572)

This commit is contained in:
Hans 2016-08-09 09:36:37 -07:00 committed by Alex Rickabaugh
parent 94e1ab33ce
commit 01bca41168
1 changed files with 2 additions and 1 deletions

View File

@ -16,8 +16,9 @@ export function main(project: string, basePath?: string, codegen?: CodegenExtens
if (fs.lstatSync(project).isFile()) {
projectDir = path.dirname(project);
}
// file names in tsconfig are resolved relative to this absolute path
basePath = path.join(process.cwd(), basePath || projectDir);
basePath = path.resolve(process.cwd(), basePath || projectDir);
// read the configuration options from wherever you store them
const {parsed, ngOptions} = tsc.readConfiguration(project, basePath);