-
-
Notifications
You must be signed in to change notification settings - Fork 5k
Vue router resolves async route component before global guard hook has been resolved #1329
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
Comments
I'm not sure if we should go back to the previous behaviour because we can start getting the async comp while the I updated your repro to this: https://jsfiddle.net/qs161n6g/1 which is clearer in my opinion |
I see but let me explain (based on my app auth-flow) why I would like to prevent this behavior... imagine this scenario: I have these routes:
and some relevant parts on my app:
How things worked before:
How things work now:
And this is a problem for me because, both chunks (Panel/Home) are very huge in my case ~350 kb, and and therefore I would prefer not to preload them before my authentication check is complete. So my question now is - is there a way to bring back the old behavior or some kinda workaround for my case? I hope all is clear to you and appreciate the help :) |
I see. There's probably something that can be done to improve the control of when to fetch the async view |
Version
2.4.0
Reproduction link
2.4.1 - https://jsfiddle.net/bfpuee6e/
2.3.1 - https://jsfiddle.net/0ogdn5mu/
Steps to reproduce
What is expected?
i expect the same behavior in 2.4.0 as in 2.3.1.
What is actually happening?
Vue router now resolves async component before global hooks have been resolved.
The text was updated successfully, but these errors were encountered: