vuepress / ecosystem

Official plugins and themes for VuePress2
https://ecosystem.vuejs.press
MIT License
28 stars 37 forks source link

[Bug report] Hydration attribute mismatch with theme-default #282

Open Mister-Hope opened 1 day ago

Mister-Hope commented 1 day ago

Description

See console

Reproduction

https://ecosystem.vuejs.press/

Used Package Manager

pnpm

System Info

.
Mister-Hope commented 1 day ago

@pengzhanbo Need some help here, I am not finding the reason myself

pengzhanbo commented 1 day ago
<a aria-label="Theme Guidelines" class="route-link auto-link" href="/themes/guidelines"><!---->Theme Guidelines<!----></a>

  - rendered on server: href="/themes/guidelines"
  - expected on client: href="/themes/guidelines.html"
  Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead.
  You should fix the source of the mismatch.

The <AutoLink> component has inconsistent results between SSR and client-side rendering when handling the href attribute.

pengzhanbo commented 1 day ago

But when I built it locally and checked the SSR output, it turned out to be normal.

Mister-Hope commented 1 day ago

Yes, and that's why I am confusing.

The console warning seems to be another confusion, as such detailed msg should only be outputted with a VUE_XXX to be true, and that needs a --debug flag