From bdd3cca9ab93cbfc3bb4c75bb4cef1eebccce1fa Mon Sep 17 00:00:00 2001 From: Joey Perrott Date: Tue, 25 May 2021 11:06:34 -0700 Subject: [PATCH] docs: update wording for angular libraries mapping peer dependencies (#42322) Update the wording for Angular Libraries mapping of peer dependencies to make it clearer that only the parts of @angular/* that the library depends on should be marked as peer dependencies. Closes #37304 PR Close #42322 --- aio/content/guide/creating-libraries.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aio/content/guide/creating-libraries.md b/aio/content/guide/creating-libraries.md index a5deb2b99b..c5306e1f08 100644 --- a/aio/content/guide/creating-libraries.md +++ b/aio/content/guide/creating-libraries.md @@ -157,7 +157,7 @@ For example, `main` should point at a JavaScript file, not a TypeScript file. ### Use TypeScript path mapping for peer dependencies -Angular libraries should list all `@angular/*` dependencies as peer dependencies. +Angular libraries should list any `@angular/*` dependencies the library depends on as peer dependencies. This ensures that when modules ask for Angular, they all get the exact same module. If a library lists `@angular/core` in `dependencies` instead of `peerDependencies`, it might get a different Angular module instead, which would cause your application to break.