File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,12 @@ export default defineNuxtModule<ModuleOptions>({
23
23
logLevel : nuxt . options . dev ? 'verbose' : 'warning' ,
24
24
} ) ,
25
25
async setup ( moduleOptions , nuxt ) {
26
+ const resolver = createResolver ( import . meta. url )
27
+ nuxt . hook ( 'prepare:types' , ( { references } ) => {
28
+ const types = resolver . resolve ( './runtime/types.d.ts' )
29
+ references . push ( { path : types } )
30
+ } )
31
+
26
32
if ( nuxt . options . _prepare ) {
27
33
return
28
34
}
@@ -35,8 +41,6 @@ export default defineNuxtModule<ModuleOptions>({
35
41
options . extends = nuxt . options . htmlValidator . options . extends
36
42
}
37
43
38
- const { resolve } = createResolver ( import . meta. url )
39
-
40
44
if ( nuxt . options . dev ) {
41
45
nuxt . hook ( 'nitro:config' , ( config ) => {
42
46
// Transpile the nitro plugin we're injecting
@@ -55,11 +59,6 @@ export default defineNuxtModule<ModuleOptions>({
55
59
} ) )
56
60
config . virtual [ '#html-validator-config' ] = `export default ${ serialisedOptions } `
57
61
} )
58
-
59
- nuxt . hook ( 'prepare:types' , ( { references } ) => {
60
- const types = resolve ( './runtime/types.d.ts' )
61
- references . push ( { path : types } )
62
- } )
63
62
}
64
63
65
64
if ( ! nuxt . options . dev ) {
You can’t perform that action at this time.
0 commit comments