stereobooster / react-snap

👻 Zero-configuration framework-agnostic static prerendering for SPAs
MIT License
5.05k stars 394 forks source link

[vue-router] Routes are appended to the current route #445

Closed leo1200 closed 4 years ago

leo1200 commented 4 years ago

Bug Report

Current Behavior I am using router-links on my pages. After implementing react-snap, those stopped working correctly, routes are appended. I looked into the generated HTML and everything is fine there.

Reproducible demo Take a look at the green buttons on https://static.lernzettel.org/metrum/ - when accessing the page via this link, the links are not working correctly - however, when navigating there from the homepage everything is fine. https://lernzettel.org/metrum is the version without using react-snap - no issues there in either case. I hope this is good enough for a demo. The relevant code is:

<v-card :to="{ path: post.meta.previous_post.slug}"></v-card> post.meta.previous_post.slug in this case is "/kadenz" | I am using vuetify, should be rendered as a normal router-link | The router is in history mode.

Thanks for any help in advance ;)

Expected behavior/code Navigation without appending to the current route.

Possible Solution

Additional context/Screenshots Add any other context about the problem here. If applicable, add screenshots to help explain.

leo1200 commented 4 years ago

post.meta.previous_post.slug was kadenz and not /kadenz - I simply had to add the /, arrrgh