fix: allow users to pass in absolute paths to ngc (#10572)
This commit is contained in:
parent
94e1ab33ce
commit
01bca41168
@ -16,8 +16,9 @@ export function main(project: string, basePath?: string, codegen?: CodegenExtens
|
|||||||
if (fs.lstatSync(project).isFile()) {
|
if (fs.lstatSync(project).isFile()) {
|
||||||
projectDir = path.dirname(project);
|
projectDir = path.dirname(project);
|
||||||
}
|
}
|
||||||
|
|
||||||
// file names in tsconfig are resolved relative to this absolute path
|
// 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
|
// read the configuration options from wherever you store them
|
||||||
const {parsed, ngOptions} = tsc.readConfiguration(project, basePath);
|
const {parsed, ngOptions} = tsc.readConfiguration(project, basePath);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user