linzhengen / tech-notes

My tech notes write in github issues🧲
1 stars 0 forks source link

[20201202] vue-router 4以降からNotFoundページの書き方が変わった #46

Open linzhengen opened 3 years ago

linzhengen commented 3 years ago

Before

  {
    path: '*',
    name: 'notFound',
    component: () => import(/* webpackChunkName: "notFound" */ '@/views/NotFound.vue'),
  },

After

  {
    path: '/:catchAll(.*)',
    name: 'notFound',
    component: () => import(/* webpackChunkName: "notFound" */ '@/views/NotFound.vue'),
  },