Skip to content

Commit fb5168e

Browse files
committedFeb 3, 2025·
fix: support legacy
1 parent f9095dd commit fb5168e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎packages/unhead/src/legacy/index.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { DeprecationsPlugin } from '../plugins/deprecations'
1616
import { PromisesPlugin } from '../plugins/promises'
1717
import { ServerEventHandlerPlugin } from '../server/plugins/eventHandlers'
1818
import { PayloadPlugin } from '../server/plugins/payload'
19+
import {createDebouncedFn, renderDOMHead} from "unhead/client";
1920

2021
export * from './useScript'
2122

@@ -42,7 +43,6 @@ export function createServerHead<T extends Record<string, any> = Head>(options:
4243
document: false,
4344
plugins: [
4445
...(options.plugins || []),
45-
DomPlugin(),
4646
DeprecationsPlugin,
4747
PromisesPlugin,
4848
ServerEventHandlerPlugin,
@@ -57,7 +57,9 @@ export function createHead<T extends Record<string, any> = Head>(options: Create
5757
...options,
5858
plugins: [
5959
...(options.plugins || []),
60-
DomPlugin(),
60+
DomPlugin({
61+
render: createDebouncedFn(() => renderDOMHead(activeHead.value), fn => setTimeout(() => fn(), 10)),
62+
}),
6163
DeprecationsPlugin,
6264
PromisesPlugin,
6365
ClientEventHandlerPlugin,

0 commit comments

Comments
 (0)
Please sign in to comment.