maoberlehner / vue-lazy-hydration

Lazy Hydration of Server-Side Rendered Vue.js Components
MIT License
1.18k stars 52 forks source link

[WIP] feat(lazy-imports): lazy import workaround #52

Closed simllll closed 4 years ago

simllll commented 4 years ago

it actually works already, but I stumpled onto something else while working on this when there is scoped css in the game. Try to look into this too.

Funny thing came up, it looks like this worked in my scenario due to the reason that I use "modern: client" in my nuxt app. See https://github.com/nuxt/nuxt.js/issues/7311

simllll commented 4 years ago

You can close this PR if you want to, it's only working due to a bug in nuxt, which leads to this behaviour (see https://github.com/nuxt/nuxt.js/issues/7311). On the other side, we can use this bug for now to get async loading up and running ;)

simllll commented 4 years ago

I've posted an example module to workaround this issue in nuxt: https://github.com/vuejs/vue/issues/9847#issuecomment-626154095