Closed manniL closed 8 hours ago
I'm not familiar with internal Nuxt codebase but as a user of Nuxt, I kind of enjoy using window.__NUXT__
to access data when Vue devtools are not available. I often look at pinia store through window.__NUXT__.pinia
. And even cooler is that it is also available on prod which makes debugging really pleasant.
@martinszeltins you can use window.useNuxtApp
in Nuxt 3 for that 😋
Here is a link to the PR introducing it and to a video about it I made
@martinszeltins you can use
window.useNuxtApp
in Nuxt 3 for that 😋 Here is a link to the PR introducing it and to a video about it I made
Ah, I wasn't aware of window.useNuxtApp
, I guess in that case window.__NUXT__
is indeed not needed anymore.
In the case of closed SSR, currently window. Write too much unnecessary code, SPA application is not very friendly, there is no way to remove
Is there a way to use a micro front-end?
Describe the feature
Apparently it only exists for backwards-compat according to code comments:
https://github.com/nuxt/nuxt/blob/648ef069931336b8ee0c0e48fef3ee700ebc3dbe/packages/nuxt/src/app/plugins/revive-payload.client.ts#L52-L53
Nuxt v4 might be a good point to remove it if that's the case.
PR: #19205
Additional information
Final checks