Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

243
Views
vue-router 4 '/:pathMatch(.*)*' not working?

hello guys I want to ask about vue-router. when I use vue 2 if there is a page that doesn't match, I use path: '*' to go to my page404 but in vue 3 it's been replaced with '/:pathMatch(.)' after i tried it the warning in console disappeared but i just got a blank page and it doesn't point to my page404. did i miss something? I'm newbie with vue 3

here is the version I'm using:

  1. vue: ^3.0.0
  2. vue-router: ^4.0.0-0

and this is my index.js

import { createRouter, createWebHistory, RouterView } from 'vue-router'

const routes = [
   {
      path: '/',
      redirect: '/login',
      component: RouterView,
      children: [{
        path: '/login',
        component: () => import('@/views/login/Login.vue'),
      }]
   },
   {
      path: '/:pathMatch(.*)*',
      component: () => import('@/views/page404/Page404.vue')
   }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!