From b3af5dbe5dc183f2fb22ff4e05e30c33ed218ef7 Mon Sep 17 00:00:00 2001 From: Evan You Date: Sun, 19 Jul 2020 11:52:03 -0400 Subject: [PATCH] chore: more detailed teleport target warning close #1629 --- packages/runtime-core/src/components/Teleport.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/runtime-core/src/components/Teleport.ts b/packages/runtime-core/src/components/Teleport.ts index ceeb451df..a4fdd4b50 100644 --- a/packages/runtime-core/src/components/Teleport.ts +++ b/packages/runtime-core/src/components/Teleport.ts @@ -41,7 +41,10 @@ const resolveTarget = ( if (!target) { __DEV__ && warn( - `Failed to locate Teleport target with selector "${targetSelector}".` + `Failed to locate Teleport target with selector "${targetSelector}". ` + + `Note the target element must exist before the component is mounted - ` + + `i.e. the target cannot be rendered by the component itself, and ` + + `ideally should be outside of the entire Vue component tree.` ) } return target as any