Answer the question
In order to leave comments, you need to log in
How to remove Vue-router from assets/app url?
Hello everyone , I
ran into a problem
on the project, the routing is built on vue-router
on the locale, everything works fine,
but for each link, assets / app is added
to the project (vue + laravel)
array with routes:
const routes = [{
path: "/:locale(uk|ru)?",
component: Main,
children: [{
path: "/",
name: "Home",
component: Home,
},
{
path: "archive/",
name: 'Archive',
component: () => import( /* webpackChunkName: "archive" */ '@/pages/Archive.vue'),
props: (route) => ({
query: route.query.tag
})
},
{
path: ":rubric",
name: "Rubric",
component: () => import( /* webpackChunkName: "rubric" */ '@/pages/News.vue'),
meta: {
layout: 'main-layout'
}
},
{
path: ":rubric/:subRubric",
name: "RubricArticle",
component: () => import( /* webpackChunkName: "rubric-article" */ '@/pages/News.vue'),
meta: {
layout: 'main-layout'
}
},
{
path: ":rubric/:slug",
name: "noSubrubricArticle",
component: () => import( /* webpackChunkName: "rubric-article" */ '@/pages/Article.vue'),
meta: {
layout: 'main-layout'
}
},
{
path: ":rubric/:subRubric/:slug",
name: 'Article',
component: () => import( /* webpackChunkName: "rubric" */ '@/pages/Article.vue'),
params: true
},
],
},
{
path: '*',
name: 'error404',
component: () => import( /* webpackChunkName: "errorPage" */ '@/layout/ErrorLayout.vue'),
}
];
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question