-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
serverPrefetch
hooks in mixins not called during SSR
#2889
Comments
The logic for processing |
Hey @edison1105! Thanks for the timely reply. So is it confirmed to be a bug of Vue 3? I am not sure if writing
Please correct me. It's very likely that I misunderstood something here and there... |
I'm think the best is to make it consistent with Vue 2. BTW, your code not handled |
Thank you for pointing the direction. I'll take a deeper look!
No, it doesn't, and it doesn't handle mixins with a mixin either. By no means that was a proper fix. 😂 |
serverPrefetch
hooks not called during SSRserverPrefetch
hooks in mixins not called during SSR
@tabjy I think you can submit your PR if it is ready. |
@edison1105 I don't know the workflow here. I was under the impression submitting it after someone from @vuejs confirms it to be a bug and assigns me to it, but you're right. I might as well submit it now. Worst case they can just close it if it's a wontfix. Thank you! |
@tabjy Thanks your PR, and sorry for being late. |
After this #3070, I think it's ok to define merge logic in |
Version
3.0.4
Reproduction link
https://codesandbox.io/s/vue-ssr-bug-o1nbv?file=/src/index.js
Steps to reproduce
The
serverPrefetch
hook mixed intoMyComponent
is not called during SSR.What is expected?
When refreshing the SSR page, it is expected to see
serverPrefetch
hooks for bothComponentA
(defined explicitly as a local option) andComponentB
(defined via a mixin) invoked by server renderer.What is actually happening?
Only the locally defined hook for
ComponentA
is invoked:I'm not very familiar with Vue. Sorry if this turns out to be an id10t error.
The text was updated successfully, but these errors were encountered: