FEMessage / FEMessage/nuxt-micro-frontend

Sub App only works first time

Aperta
#46 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
128
Fork
25
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

## Describe the bug
When importing a SubApp it only works the first time it loads. If I navigate away from the SubApp page and come back then it no longer mounts / displays.

Here is a repo to demo the behaviour: https://github.com/Reiss-Cashmore/nuxt-single-spa-bug

## Screenshots
https://user-images.githubusercontent.com/17616211/152579668-38b8cbc8-1601-4509-b2fb-ebb6b0fec2a3.mp4

## To Reproduce
Steps to reproduce the behavior:
1. Build app as UMD and use import()
2. Click on NuxtLink to navigate to SubApp
3. Click on NuxtLink to navigate to Home
4. Click on NuxtLink to navigate to SubApp
5. SubApp is not shown

I've noticed that the SubApp unmount() and beforeUnmount() in MFE.js do **not** get called for some reason??

## environment information
- OS: Mac OSX 10.14.6
- Env: Node 14.6
- Browser: Chrome

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.