Skip to content
Discussion options

You must be logged in to vote

Thanks for your feedback, I guess the reason for this problem is the same as the previous issue (#139 (comment)), the router should also be bound to the vue instance, remote and host are running in different vue instances, so they can't share the router, when you need to define the router, you have to define it on the host side, like this

const router = createRouter({
    history: createWebHashHistory(), 
    routes: [
        {
            path: '/',
            redirect: '/introduce'
        },
        {
            path: '/login',
            name: 'login',
            component: defineAsyncComponent(() => import("router-remote/Login"))
        },
        {
            path: '/shopping',

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@franklion
Comment options

@Jiannan-dev
Comment options

@Jiannan-dev
Comment options

@ghost
Comment options

Answer selected by franklion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants