How to implement in nuxt.js such ranting?

Is it possible to implement such a structure of ranting on nuxt.js
example.com/:product/:code
example.com/:category/:code

where
:product - slug of the product
:category - slug of category
:code - the code for the product consists of a prefix 'p' and number (p12345), for the category code consists of a prefix 'c' and number (с12345).

If it is still possible to implement, will not affect it's performance?
April 3rd 20 at 17:40
1 answer
April 3rd 20 at 17:42
Solution
Possible:
/:product/:code(p\\d+)
/:category/:code(c\\d+)

The performance will not be affected.
Thank you. Works.
router: {
extendRoutes(routes, resolve) {
routes.push({
name: 'productRouter',
path: '/:product/:code(p\\d+)',
component: resolve(__dirname, 'components/product/Product.vue')
})
routes.push({
name: 'categoryRouter',
path: '/:category/:code(c\\d+)',
component: resolve(__dirname, 'components/category/Category.vue')
})
}
}, - Giuseppe66 commented on April 3rd 20 at 17:45
extendRoutes - Giuseppe66 commented on April 3rd 20 at 17:48

Find more questions by tags Vue.jsNuxt.js