Skip to content

(Vue 3) singleSpa.navigateToUrl is clashing with vue-router #89

@jaydgruber

Description

@jaydgruber

vue-router seems to be intercepting events after it should have already been destroyed.

It seems like after single-spa tells the vue app to unmount, vue-router is continuing to try and catch routing events.
This looks related to vuejs/vue-router#3172, but I am not sure on the dovetail relationship between the vue-router (v3) & vue-router-next (v4) repos.

As far as I can tell, this is an issue with vue-router 4, but not with vue-router 3.

I made an small example repro. To be clear, I don't think this is an issue with having two different versions of Vue loaded on the same page. The work repo where I encountered this issue is using 1 React app & 1 Vue app. I made the repro with two different versions of Vue to illustrate that (Vue 2 / vue-router 3) seems fine, while (Vue 3 / vue-router 4) seems to have a problem.

example repo illustrating the problem

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions