Vue · Template
Reports a v-else-if branch whose condition repeats, or is fully covered by, earlier conditions in the same v-if / v-else-if chain. Conditions over primitive literals and primitive-literal script setup constants are reported as proven. Conditions that also read script setup refs and shallowRefs initialized with a literal, getter-only computed values, models without get or set options, or props are reported as heuristic-high.
vite-doctor/vuetemplatewarnNo fix
Why it happens
Vue renders the first branch of a chain whose condition is truthy. A later branch whose condition can only be truthy when an earlier one already is never renders, which usually hides a copy-paste mistake in the condition.
Fix
Change the later condition to the one the branch was meant to test, or remove the branch.
Example
Test a different value in each branch
Before
<script setup>
import { ref } from 'vue'
const status = ref('idle')
</script>
<template>
<p v-if="status === 'loading'">Loading…</p>
<p v-else-if="status === 'loading'">Failed</p>
</template>
After
<script setup>
import { ref } from 'vue'
const status = ref('idle')
</script>
<template>
<p v-if="status === 'loading'">Loading…</p>
<p v-else-if="status === 'error'">Failed</p>
</template>
Verify the fix
Run only this rule after editing so the report stays focused on the diagnostic you are closing:
pnpm vite-doctor . --framework vue --rules vue/template/no-dupe-v-else-if