Skip to content

Commit f3908f8

Browse files
committedMar 13, 2025
fix(schemaOrg): eagerly load node resolver
1 parent f65642f commit f3908f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎packages/schema-org/src/plugin.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
createSchemaOrgGraph,
88
} from './core/graph'
99
import { resolveMeta } from './core/resolve'
10+
import { loadResolver } from './resolver'
1011

1112
export interface PluginSchemaOrgOptions {
1213
minify?: boolean
@@ -42,7 +43,6 @@ export function SchemaOrgUnheadPlugin(config: MetaInput, meta: () => Partial<Met
4243
for (const tag of tags) {
4344
if (tag.tag === 'script' && tag.props.type === 'application/ld+json' && tag.props.nodes) {
4445
// this is a bit expensive, load in seperate chunk
45-
const { loadResolver } = await import('./resolver')
4646
const nodes = await tag.props.nodes
4747
for (const node of Array.isArray(nodes) ? nodes : [nodes]) {
4848
// malformed input

0 commit comments

Comments
 (0)
Please sign in to comment.