Skip to content

Commit

Permalink
fix(angular): adjust generated tsconfig path mapping for publishable …
Browse files Browse the repository at this point in the history
…libraries

ISSUES CLOSED: #2794
  • Loading branch information
juristr committed Apr 9, 2020
1 parent 7c45f98 commit bd2e667
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/angular/src/schematics/library/library.ts
Original file line number Diff line number Diff line change
Expand Up @@ -406,9 +406,12 @@ function updateTsConfig(options: NormalizedSchema): Rule {
return updateJsonInTree('tsconfig.json', json => {
const c = json.compilerOptions;
delete c.paths[options.name];
c.paths[`@${nxJson.npmScope}/${options.projectDirectory}`] = [
`libs/${options.projectDirectory}/src/index.ts`
];

const pathName = options.publishable
? `@${nxJson.npmScope}/${options.name}`
: `@${nxJson.npmScope}/${options.projectDirectory}`;

c.paths[pathName] = [`libs/${options.projectDirectory}/src/index.ts`];
return json;
})(host, context);
}
Expand Down

0 comments on commit bd2e667

Please sign in to comment.