I'm building a multipage app using vue-cli. I want to implement a dynamic url like,
example.com/user/user1
example.com/user/user2
example.com/user/user3
...
How to implement this in vue.config.js file?
Currently, my vue.config.js file looks like this:
module.exports = {
pages: {
'homepage': {
entry: './src/pages/Homepage/main.js',
template: 'public/index.html',
title: 'Homepage',
chunks: [ 'chunk-vendors', 'chunk-common', 'homepage' ]
},
'about': {
entry: './src/pages/About/main.js',
template: 'public/about.html',
title: 'About',
chunks: [ 'chunk-vendors', 'chunk-common', 'about' ]
},
'user': {
entry: './src/pages/User/main.js',
template: 'public/index.html',
title: 'User',
chunks: [ 'chunk-vendors', 'chunk-common', 'user' ]
}
}
}
I need an option like
user/:id
Looking for feedback on how to implement such dynamic urls.