[Vuejs]-Nuxt router dynamic param for every route as a suffix

0👍

Are you sure the extendRoutes is in the router object?

The following is an example for users, make sure to push to routes and not overwrite it.

    router: {
        extendRoutes(routes, resolve) {
            routes.push({
                name: 'users',
                path: '/users/:region',
                component: resolve(__dirname, 'src/pages/PATH_TO_COMPONENT/_id.vue'),
            });
            routes.push({
                name: 'products',
                path: '/products/:region',
                component: resolve(__dirname, 'src/pages/PATH_TO_COMPONENT/_id.vue'),
            });
            routes.push({
                name: 'samsung-flip',
                path: '/products/samsung-flip/:region',
                component: resolve(__dirname, 'src/pages/PATH_TO_COMPONENT/_id.vue'),
            });
        },
    },

Leave a comment