FEMessage / FEMessage/nuxt-micro-frontend

Sub App only works first time

Offen
#46 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
JavaScript
Sterne
128
Forks
25
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

## 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

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.