Im using the Router in vue for creating my links to different pages. It works fine and my page is more or less done when I noticed that if I for example opens an URL in a new window it returns as 404 Not Found
I got this code in my Router:
export default new Router({
mode: "history",
base: process.env.BASE_URL,
routes: [
// navbar
{
path: "/",
name: "home",
component: () =>
import(/* webpackChunkName: "home" */ "./views/Home.vue")
},
{
path: "/blog",
name: "blog",
// route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () =>
import(/* webpackChunkName: "about" */ "./views/Blog.vue")
},
Say for example I am opening my blog page. The URL will then be mypage.com/blog
If I open this in some other page or refresh my page it returns as not found. How can I make it route to the right page on update?