#window is not defined after upgrade from Nuxt 3.4.1 to 3.4.2 with examples

10 messages · Page 1 of 1 (latest)

normal shard
#

I just upgraded my App from 3.4.1 to 3.4.2 and discovered an issue with ClientOnly component.

I have leaflet included which is a client only library, that's why I'm using <ClientOnly> here.

Is there any other way to achieve that, even with 3.4.2? I'm not sure if it is a bug or I'm just using it wrong.

I created a minimal example:

https://stackblitz.com/edit/nuxt-3-4-1-leaflet?file=app.vue - Working with 3.4.1
https://stackblitz.com/edit/nuxt-3-4-2-leaflet?file=app.vue - Broken with 3.4.2

Create a new Nuxt project, module, layer or start from a theme with our collection of starters.

Create a new Nuxt project, module, layer or start from a theme with our collection of starters.

glass agate
#

@normal shard u can make it work like this

#

buy putting file in
/components/global

#

and name it like Map.client.vue or ElMap.client.vue

vague hill
#

Why would the component need to be global?

normal shard
lament crystal
glass agate
#

Before when I used to test it it was working only inside global folder but maybe that got changed by updates @normal shard @lament crystal