Added not found page

This commit is contained in:
Kamil Niemczycki 2021-04-07 16:36:57 +02:00
parent 41ba3104e0
commit 4e9729508f
2 changed files with 12 additions and 0 deletions

View File

@ -2,6 +2,7 @@ import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import About from '../views/About.vue'
import NotFound from '../views/NotFound'
Vue.use(VueRouter)
@ -18,6 +19,11 @@ const routes = [
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: About
},
{
path: '*',
name: '404',
component: NotFound
}
]

6
src/views/NotFound.vue Normal file
View File

@ -0,0 +1,6 @@
<template>
<div id="not-found">
<h1>Error 404</h1>
<p>Not found</p>
</div>
</template>