Deploy Vue App in sub
dirrectory
1. Create a file
if not has Vue.config.js near package.json file in Main folder.
2. Add below code:
module.exports = {
publicPath:
'/aimsservice'
}
Enable history mode
1. Add below code in router file:
Vue.use(VueRouter)
const routes1 = [
{
path:
'/',
name:
'Home',
component: AccessDenied
},
{
path:
'/materialcomment',
name:
'MaterialComment',
component: MaterialComment
},
{
path:
'/materialcommentlist',
name:
'MaterialCommentList',
component: MaterialCommentList
}
]
const router = new VueRouter({
routes:
routes1
,mode:'history'
,base: process.env.BASE_URL
})
Enable history
No comments:
Post a Comment