Skip to content

Commit 5cb93ff

Browse files
committedNov 21, 2024·
fix(module): fixed the client-only warning
1 parent 0f456eb commit 5cb93ff

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed
 

‎README.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,7 @@ pnpm build:dev
111111
```html
112112
<!-- App.vue -->
113113
<template>
114-
<ClientOnly>
115-
<Toaster />
116-
</ClientOnly>
114+
<Toaster />
117115
<button @click="() => toast('My first toast')">Render a toast</button>
118116
</template>
119117

‎playground/app.vue

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
<template>
22
<div>
3-
<ClientOnly>
4-
<Toaster position="top-center" />
5-
</ClientOnly>
3+
<Toaster position="top-center" />
64

75
<button @click="$toast('Render a toast')">Render a toast</button>
86
</div>

‎src/module.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ const module: NuxtModule<ModuleOptions> = defineNuxtModule<ModuleOptions>({
2424
addComponent({
2525
name: 'Toaster',
2626
export: 'Toaster',
27-
filePath: 'vue-sonner'
27+
filePath: 'vue-sonner',
28+
mode: 'client'
2829
})
2930

3031
addPlugin({

0 commit comments

Comments
 (0)
Please sign in to comment.