Steps
1, Create your own "NotFound.vue" page
2, Add code to main.ts
:
const routes = [
{
path: "/",
name: "home",
component: Home,
},
// ... other paths ...
{
path: "/:pathMatch(.*)*",
name: "not-found",
component: () => import("@/pages/NotFound.vue"),
},
]
3, Config Nginx:
location / {
try_files $uri $uri/ /index.html;
}
Top comments (0)