antfu-collective / vitesse

🏕 Opinionated Vite + Vue Starter Template

Home Page:https://vitesse.netlify.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Conflict if component name is same as page name

kissu opened this issue · comments

I found out that I do have an infinite loop when having a page named /test and a Test.vue component

image

I do also get those warnings, even if it's totally unrelated to attrs since I do not have any root nodes: akauppi/GroundLevel-firebase-es#20

/pages/index.vue

<template>
  <router-link :to="{ name: 'test' }">
    go to test page
  </router-link>
</template>

/pages/test.vue

<template>
  <div>
    this is a test page, below test component
  </div>

  <test />
</template>

Test.vue component

<template>
  this is a test component, cool huh?
</template>

This is using the latest version of Vitesse, and here is a Github repo, trying to build it of course crashes.

I think this is how Vue SFC has been defined. Try rename your component add avoid this usage.

Yep, simply knowing this is enough. Just wanted to point it out, if somebody stumbles upon this!