From: Aurelius333 <22969541+Aurelius333@users.noreply.github.com> Date: Mon, 3 Aug 2020 21:14:14 +0000 (-0400) Subject: chore(compiler-core): improve X_V_IF_KEY error message (#1757) X-Git-Tag: v3.0.0-rc.6~77 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=86cdf6694dd25383cf6f9611e0a5d8650e684970;p=thirdparty%2Fvuejs%2Fcore.git chore(compiler-core): improve X_V_IF_KEY error message (#1757) --- diff --git a/packages/compiler-core/src/errors.ts b/packages/compiler-core/src/errors.ts index 4af2321633..58b10259e7 100644 --- a/packages/compiler-core/src/errors.ts +++ b/packages/compiler-core/src/errors.ts @@ -136,7 +136,10 @@ export const errorMessages: { [code: number]: string } = { // transform errors [ErrorCodes.X_V_IF_NO_EXPRESSION]: `v-if/v-else-if is missing expression.`, - [ErrorCodes.X_V_IF_KEY]: `v-if branches must use compiler generated keys.`, + [ErrorCodes.X_V_IF_KEY]: + `v-if branches must use compiler generated keys. ` + + `In many cases, you can simply remove this key. ` + + `If this tag is inside of a