Coder Social home page Coder Social logo

Comments (6)

joeldenning avatar joeldenning commented on July 3, 2024

Try running System.resolve('app3') to see what the url is for app3. It might return a promise, in which case do System.resolve('app3').then(url => console.log(url)). Is that url correct?

from coexisting-vue-microfrontends.

yangangzhang avatar yangangzhang commented on July 3, 2024

Try running System.resolve('app3') to see what the url is for app3. It might return a promise, in which case do System.resolve('app3').then(url => console.log(url)). Is that url correct?

Yes, the url is right.
error

from coexisting-vue-microfrontends.

yangangzhang avatar yangangzhang commented on July 3, 2024

I found a solution to this problem.

The app2

router.js

{
      path: '/app2/about',
      name: 'about',
      // route level code-splitting
      // this generates a separate chunk (about.[hash].js) for this route
      // which is lazy-loaded when the route is visited.

      component: () => import( /* webpackChunkName: "about2" */ './views/About.vue')

    }

The app3

router.js

{
      path: '/app3/about',
      name: 'about',
      // route level code-splitting
      // this generates a separate chunk (about.[hash].js) for this route
      // which is lazy-loaded when the route is visited.

      component: () => import( /* webpackChunkName: "about3" */ './views/About.vue')

    }

Different subapps have different webpackChunkName names

image

from coexisting-vue-microfrontends.

yangangzhang avatar yangangzhang commented on July 3, 2024

In short,Accessing a large subapp, I found that other problems caused by lazy routing loading prevented the handover from successfully switching to other apps.
If you don't use routing lazy loading, there's no problem.

other problems
error1

from coexisting-vue-microfrontends.

joeldenning avatar joeldenning commented on July 3, 2024

Can you create an issue on single-spa-angular, with a link to a github repo that reproduces the problem.

Maybe title it "Lazy loaded routes cause errors"

from coexisting-vue-microfrontends.

yangangzhang avatar yangangzhang commented on July 3, 2024

A github repo
https://github.com/yangangzhang/coexisting-vue-microfrontends
You can test the problem above.
Thanks again

from coexisting-vue-microfrontends.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.