File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change 22 addBuildPlugin ,
33 addComponentsDir ,
44 addImports ,
5- addImportsDir ,
65 addPluginTemplate ,
76 createResolver ,
87 defineNuxtModule ,
@@ -128,9 +127,21 @@ export default defineNuxtModule<ModuleOptions>({
128127 version : nuxt . options . dev ? version : undefined ,
129128 defaultScriptOptions : config . defaultScriptOptions ,
130129 }
131- addImportsDir ( [
132- await resolvePath ( './runtime/composables' ) ,
133- ] )
130+
131+ const composables = [
132+ 'useScript' ,
133+ 'useScriptEventPage' ,
134+ 'useScriptTriggerConsent' ,
135+ 'useScriptTriggerElement' ,
136+ ]
137+ for ( const composable of composables ) {
138+ addImports ( {
139+ priority : 2 ,
140+ name : composable ,
141+ as : composable ,
142+ from : await resolvePath ( `./runtime/composables/${ composable } ` ) ,
143+ } )
144+ }
134145
135146 addComponentsDir ( {
136147 path : await resolvePath ( './runtime/components' ) ,
You can’t perform that action at this time.
0 commit comments