vuejs / router

🚦 The official router for Vue.js
https://router.vuejs.org/
MIT License
3.88k stars 1.18k forks source link

When update the page show message warning when it use vue router dynamically #2164

Closed matteo6b closed 7 months ago

matteo6b commented 7 months ago

Reproduction

https://stackblitz.com/edit/vitejs-vite-xflg3u?file=src%2Frouter.ts

Steps to reproduce the bug

When you stay in dynamically route created and update the page wIth F5

Expected behavior

You wouldn't have any warning errors.

Actual behavior

image

Additional information

No response

posva commented 7 months ago

When reloading the router requires you to add the routes again, so it’s normal it can’t find the location