Skip to content

Full reload with HMR + lazy loading #2418

Discussion options

You must be logged in to vote

Today I actually found the fix, which is completely unrelated to vue router.
The issue occurs when there are auto imported global dependencies such as e.g. vuetify, which are not auto discovered automatically during an initial scan (-> https://vite.dev/guide/dep-pre-bundling.html#customizing-the-behavior).
Now, if after adding lazy loading vite always needs to discover these dependencies first, so navigation is not happening -.-.
There are two ways to fix this behavior:
a) include these dependencies to optimized deps (in vite)
b) exclude these dependencies from optimized deps (in vite)

I hope this can help someone else, after hours and days of wonders and search 😅

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@sarahsporck
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by sarahsporck
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants