fix(angular): normalize path in ng-package.json when moving a library project (#10925)

This commit is contained in:
Leosvel Pérez Espinosa 2022-06-28 18:08:01 +01:00 committed by GitHub
parent 5c1d69b054
commit f9bb54db88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,5 @@
import {
normalizePath,
readProjectConfiguration,
Tree,
updateJson,
@ -21,7 +22,9 @@ export function updateNgPackage(tree: Tree, schema: Schema): void {
return;
}
const rootOffset = relative(join(workspaceRoot, project.root), workspaceRoot);
const rootOffset = normalizePath(
relative(join(workspaceRoot, project.root), workspaceRoot)
);
let output = `dist/${project.root}`;
if (project.targets?.build?.outputs?.length > 0) {
output = project.targets.build.outputs[0];