Failed reloading Vue's nested routes
See original GitHub issueI followed vue-router’s nested routes.
I run sirv start --cors --single
on the folder.
Clicking link-by-link worked.
Reloading http://localhost:5000/user
worked.
Reloading http://localhost:5000/user/123
failed.
But Sirv logged that failed request as 200
.
I wonder if this issue is related with Sirv.
Thanks Luke!
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Vue-router nested route not loading my component page
I am using Vue-router and I was needing to use a nested route, so what I did I wrote Children Key word to...
Read more >when using Nested Routes, hot-reload is not working, child ...
it's my vue.config.js's problem, I find it. All reactions.
Read more >[Passing props to the nested routes] : Fail to work correctly ...
Hi, I'm currently learning nested routes in vuejs. When links are clicked, pages loaded and routing mechanism works.
Read more >Using Vue 3's Router in Practice - Daily.dev
Nested Routes. With nested routes, you can dynamically load components. Besides, it also fits quite well with the Vue.js component structure.
Read more >vue router refresh page not found - You.com | The AI Search ...
I'am getting error "404 Not found" when i refresh any page in my Vue JS ... with nested routes and parameters, and it...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It’s because you have
<script src="app.js"></script>
You’re allowing relative pathing to take place, which works fine when you’re on
example.com/:level1
routes but will fail on any level deeper than that.In your last example, the
app.js
is being looked for athttp://localhost:5000/settings/app.js
, which is wrong and so the application dies.Change your script to
<script src="/app.js"></script>
and it will work, since it’s an absolute path and will always resolve from the root and not from where you currently are.Same as #33