@@ -56,6 +56,15 @@ export default defineNuxtModule<ModuleOptions>({
56
56
if ( typeof moduleOptions . client === 'undefined' )
57
57
moduleOptions . client = ! ! nuxt . options . dev
58
58
59
+ const nuxtSchemaComposablesRuntime = `${ moduleRuntimeDir } /composables`
60
+
61
+ const providerPath = await resolvePath ( `${ schemaOrgPath } /providers/${ moduleOptions . full ? 'full' : 'simple' } ` )
62
+ // might need this again
63
+ nuxt . options . alias [ Pkg ] = schemaOrgPath
64
+ // set the alias for the types
65
+ nuxt . options . alias [ '#vueuse/schema-org/provider' ] = providerPath
66
+ nuxt . options . alias [ '#vueuse/schema-org/runtime' ] = nuxtSchemaComposablesRuntime
67
+
59
68
// fallback clears schema on route change
60
69
if ( ! moduleOptions . client )
61
70
addPlugin ( resolve ( moduleRuntimeDir , 'plugin-fallback.client' ) )
@@ -65,8 +74,6 @@ export default defineNuxtModule<ModuleOptions>({
65
74
mode : moduleOptions . client ? 'all' : 'server' ,
66
75
} )
67
76
68
- const nuxtSchemaComposablesRuntime = `${ moduleRuntimeDir } /composables`
69
-
70
77
addTemplate ( {
71
78
filename : 'nuxt-schema-org-config.mjs' ,
72
79
getContents : ( ) => `export default ${ JSON . stringify ( moduleOptions ) } ` ,
@@ -111,6 +118,7 @@ export default defineNuxtModule<ModuleOptions>({
111
118
mock : ! moduleOptions . client && isClient ,
112
119
full : moduleOptions . full ,
113
120
aliasPaths : {
121
+ provider : providerPath ,
114
122
pkgDir : schemaOrgPath ,
115
123
runtime : nuxtSchemaComposablesRuntime ,
116
124
} ,
0 commit comments