window.alert and nuxt generate ? window is not defined
pnpm generate
I got this error window is not defined
How I can solve this ?9 Replies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
console.log() will work on either side though
Hello thanks, my application will only work in a browser with nuxt generate. So I should put all my code in if (process.client) ?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Should I disable SSR or use process.client ?
i thought SSR is nice
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
No, it will be a static http classic server
(a little gitlab pages)
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Ah I thought that even in static, the SSR would generate all the pages in a certain way that improved the rendering, or something like that
thanks