Skip to content

Instantly share code, notes, and snippets.

@windate3411
Created January 20, 2020 13:32
Show Gist options
  • Save windate3411/75623cfb5027b1ff32246fe8b1bb57ac to your computer and use it in GitHub Desktop.
Save windate3411/75623cfb5027b1ff32246fe8b1bb57ac to your computer and use it in GitHub Desktop.
import Vue from 'vue'
import VueRouter from 'vue-router'
import NotFound from '../views/NotFound.vue'
Vue.use(VueRouter)
const routes = [
{
path: '/',
name: 'home',
component: Home
},
{
path: '*',
name: 'notFound',
component: NotFound
}
]
const router = new VueRouter({
mode: 'history',
base: process.env.BASE_URL,
routes
})
export default router
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment