Great article. But why doesn't this work with Vue 3.0?
Are you getting any errors of any sort (in the DevTools)?
Also, github.com/khalby786/personal-website is where I have implemented this and it works fine!
Errors in console: «Error: A non-empty path must start with "/"»
The way you mentioned works with Vue 2.*, but doesn't work with Vue 3.0. And I cannot understand why ...
But thanks. I'll ask on Github, maybe they will tell me there.
I think this will solve your problem: github.com/vuejs/vue-router-next#b...
TL;DR: You will need to replace path: "*" with path: "/:catchAll(.*)"
path: "*"
path: "/:catchAll(.*)"
Thank you so much! 😀 You helped me a lot. Now my 404 page is working.
Thanks for the solution!
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Great article. But why doesn't this work with Vue 3.0?
Are you getting any errors of any sort (in the DevTools)?
Also, github.com/khalby786/personal-website is where I have implemented this and it works fine!
Errors in console: «Error: A non-empty path must start with "/"»
The way you mentioned works with Vue 2.*, but doesn't work with Vue 3.0.
And I cannot understand why ...
But thanks.
I'll ask on Github, maybe they will tell me there.
I think this will solve your problem: github.com/vuejs/vue-router-next#b...
TL;DR: You will need to replace
path: "*"
withpath: "/:catchAll(.*)"
Thank you so much! 😀
You helped me a lot.
Now my 404 page is working.
Thanks for the solution!