From: Evan You Date: Sun, 19 Jul 2020 15:52:03 +0000 (-0400) Subject: chore: more detailed teleport target warning X-Git-Tag: v3.0.0-rc.2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b3af5dbe5dc183f2fb22ff4e05e30c33ed218ef7;p=thirdparty%2Fvuejs%2Fcore.git chore: more detailed teleport target warning close #1629 --- diff --git a/packages/runtime-core/src/components/Teleport.ts b/packages/runtime-core/src/components/Teleport.ts index ceeb451df0..a4fdd4b505 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