nuxt / ui

A UI Library for Modern Web Apps, powered by Vue & Tailwind CSS.
https://ui.nuxt.com
MIT License
3.57k stars 420 forks source link

`useToast()` notifications doesn't work when server side rendering is disabled #1874

Closed geauser closed 3 weeks ago

geauser commented 3 weeks ago

Environment

Version

2.17.0

Reproduction

https://github.com/geauser/toaster-issue

Description

Having ssr: false in nuxt.config.ts causes the toaster notifications to not show up anymore. Removing the ssr: false line or setting ssr: true fixes the issue.

// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
  devtools: { enabled: true },
  modules: ["@nuxt/ui"],

  ssr: false, // Issue here
})

Additional context

No response

Logs

No response

benjamincanac commented 3 weeks ago

Duplicate #1867, #1871 and #1872. Answered in https://github.com/nuxt/ui/issues/1867#issuecomment-2165516400.