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 2
2
addBuildPlugin ,
3
3
addComponentsDir ,
4
4
addImports ,
5
- addImportsDir ,
6
5
addPluginTemplate ,
7
6
createResolver ,
8
7
defineNuxtModule ,
@@ -128,9 +127,21 @@ export default defineNuxtModule<ModuleOptions>({
128
127
version : nuxt . options . dev ? version : undefined ,
129
128
defaultScriptOptions : config . defaultScriptOptions ,
130
129
}
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
+ }
134
145
135
146
addComponentsDir ( {
136
147
path : await resolvePath ( './runtime/components' ) ,
You can’t perform that action at this time.
0 commit comments