perf: tree-shake dependencies from server (#1647)
This commit is contained in:
parent
357dff2140
commit
6dc38c7d8e
12 changed files with 90 additions and 19 deletions
|
@ -1,3 +1,4 @@
|
|||
import type { Editor } from '@tiptap/vue-3'
|
||||
import { Extension, useEditor } from '@tiptap/vue-3'
|
||||
import Placeholder from '@tiptap/extension-placeholder'
|
||||
import Document from '@tiptap/extension-document'
|
||||
|
@ -27,6 +28,9 @@ export interface UseTiptapOptions {
|
|||
}
|
||||
|
||||
export function useTiptap(options: UseTiptapOptions) {
|
||||
if (process.server)
|
||||
return { editor: ref<Editor | undefined>() }
|
||||
|
||||
const {
|
||||
autofocus,
|
||||
content,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue