File tree 1 file changed +1
-9
lines changed
1 file changed +1
-9
lines changed Original file line number Diff line number Diff line change @@ -70,18 +70,9 @@ export interface ModuleOptions {
70
70
}
71
71
72
72
export interface ModuleHooks {
73
- /**
74
- * Transform a script before it's registered.
75
- */
76
73
'scripts:registry' : ( registry : RegistryScripts ) => void | Promise < void >
77
74
}
78
75
79
- declare module '@nuxt/schema' {
80
- interface NuxtHooks {
81
- 'scripts:registry' : ModuleHooks [ 'scripts:registry' ]
82
- }
83
- }
84
-
85
76
export default defineNuxtModule < ModuleOptions > ( {
86
77
meta : {
87
78
name : '@nuxt/scripts' ,
@@ -140,6 +131,7 @@ export default defineNuxtModule<ModuleOptions>({
140
131
nuxt . hooks . hook ( 'modules:done' , async ( ) => {
141
132
const registryScripts = [ ...scripts ]
142
133
134
+ // @ts -ignore nuxi prepare is broken to generate these types, possibly because of the runtime path
143
135
await nuxt . hooks . callHook ( 'scripts:registry' , registryScripts )
144
136
const registryScriptsWithImport = registryScripts . filter ( i => ! ! i . import ?. name ) as Required < RegistryScript > [ ]
145
137
addImports ( registryScriptsWithImport . map ( ( i ) => {
You can’t perform that action at this time.
0 commit comments