diff --git a/packages/workspace/src/generators/remove/lib/update-tsconfig.ts b/packages/workspace/src/generators/remove/lib/update-tsconfig.ts index 0f08c2681d..0ef5cdcf2a 100644 --- a/packages/workspace/src/generators/remove/lib/update-tsconfig.ts +++ b/packages/workspace/src/generators/remove/lib/update-tsconfig.ts @@ -16,13 +16,17 @@ export function updateTsconfig( schema: Schema, project: ProjectConfiguration ) { - const { npmScope } = getWorkspaceLayout(tree); + const { appsDir, libsDir, npmScope } = getWorkspaceLayout(tree); const tsConfigPath = 'tsconfig.base.json'; if (tree.exists(tsConfigPath)) { updateJson(tree, tsConfigPath, (json) => { delete json.compilerOptions.paths[ - `@${npmScope}/${project.root.substr(5)}` + `@${npmScope}/${project.root.substr( + project.projectType === 'application' + ? appsDir.length + 1 + : libsDir.length + 1 + )}` ]; return json;