Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vue Components rendered within Content file via SSR do not have onUnmounted events called with Vue 3.5 #2816

Open
GerryWilko opened this issue Oct 18, 2024 · 0 comments

Comments

@GerryWilko
Copy link
Contributor

Environment

  • Operating System: Darwin
  • Node Version: v20.17.0
  • Nuxt Version: 3.13.2
  • CLI Version: 3.14.0
  • Nitro Version: 2.9.7
  • Package Manager: [email protected]
  • Builder: -
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Reproduction

https://github.com/GerryWilko/unmount-repro

This repro has an index page and a test page with the same content md file rendered on them note the logs of the mounted unmounted calls for each.

Turning off SSR or downgrading to Vue 3.4 resolves the issue in this reproduction.

Describe the bug

I seem to have encountered a strange issue related to the upgrade to Vue 3.5.

When using the unmounted Vue lifecycle hooks in a component that is rendered within a markdown file we are no longer seeing the unmounted hooks called.

Here is a simple set of logs demonstrating the issue:

Vue 3.5 (no unmounted)

Image

Vue 3.4 (unmounted called)

Image

Note in Vue 3.4 we have both mounted and unmounted calls. In Vue 3.5 we are missing the unmounted call from the component but we do have it from the wrapping page being unmounted.

I believe it may be something to do with the ContentRenderer not unmounting from the SSR. All subsequent non-SSR mount and unmounting of the component work fine but the initial SSR component never seems to have its unmounted lifecycle hooks called on Vue 3.5.

Additional context

No response

Logs

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant