Skip to content

Commit f55db39

Browse files
committed
chore: bump deps
1 parent 43df06e commit f55db39

File tree

3 files changed

+2
-29
lines changed

3 files changed

+2
-29
lines changed

packages/nuxt/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
},
4242
"dependencies": {
4343
"@nuxt/kit": "3.0.0",
44-
"@unhead/schema-org-vue": "^0.1.2",
44+
"@unhead/schema-org-vue": "^0.2.2",
4545
"pathe": "^1.0.0"
4646
},
4747
"devDependencies": {

packages/schema-org/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,6 @@
5454
"vue": ">=3.2.0"
5555
},
5656
"dependencies": {
57-
"@unhead/schema-org-vue": "^0.1.2"
57+
"@unhead/schema-org-vue": "^0.2.2"
5858
}
5959
}

packages/schema-org/src/index.ts

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1 @@
1-
import { useHead } from '@vueuse/head'
2-
31
export * from '@unhead/schema-org-vue'
4-
5-
let isSPA: null | true = null
6-
7-
// we manually define this to use the useHead from @vueuse/head instead of @unhead/vue
8-
export function useSchemaOrg(input?: any): any {
9-
// if we're not in development, and we already have a schema org entry, do nothing
10-
// Note: usage of this function should be removed by the bundler in production
11-
if (process.env.NODE_ENV !== 'development' && typeof window !== 'undefined') {
12-
if (isSPA === null && !window.document.querySelector('#schema-org-graph'))
13-
isSPA = true
14-
if (!isSPA)
15-
return
16-
}
17-
return useHead({
18-
script: [
19-
{
20-
type: 'application/ld+json',
21-
key: 'schema-org-graph',
22-
id: 'schema-org-graph',
23-
// @ts-expect-error runtime
24-
nodes: input,
25-
},
26-
],
27-
}, { mode: isSPA ? 'all' : 'server' })
28-
}

0 commit comments

Comments
 (0)