D
D
Daria It doesn't matter2021-11-05 12:06:35
Vue.js
Daria It doesn't matter, 2021-11-05 12:06:35

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'),
    }
];

What could be causing this problem?
thanks in advance

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Aetae, 2021-11-05
@Aetae

1. set to publiсPath2. set to relative. 3. Environment change during build is set to . vue.config.jsassets/app
BASE_URLassets/app

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question