File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,9 @@ export default defineNuxtConfig({
3
3
devtools : { enabled : true } ,
4
4
compatibilityDate : '2025-05-13' ,
5
5
nuxtifyPages : {
6
+ // Logs
7
+ verboseLogs : true ,
8
+
6
9
// Brand
7
10
brand : {
8
11
tagline : 'This is a sample tagline for the pages module.' ,
Original file line number Diff line number Diff line change @@ -71,7 +71,9 @@ export default defineNuxtModule<ModuleOptions>({
71
71
} )
72
72
73
73
// Modules
74
- await installModule ( '@nuxtify/core' )
74
+ await installModule ( '@nuxtify/core' , {
75
+ verboseLogs : _options . verboseLogs ,
76
+ } )
75
77
76
78
// Layouts
77
79
addLayout ( {
@@ -105,5 +107,22 @@ export default defineNuxtModule<ModuleOptions>({
105
107
file : resolver . resolve ( './runtime/pages/DynamicSlug.vue' ) ,
106
108
} )
107
109
} )
110
+
111
+ // Remove duplicate imports (to suppress Nuxt warnings)
112
+ _nuxt . hook ( 'imports:extend' , ( imports ) => {
113
+ // Find and remove the 'useNuxtifyConfig' import that comes from '@nuxtify/core'
114
+ const coreImportIndex = imports . findIndex (
115
+ ( imp ) => {
116
+ // The 'name' property refers to the exported name of the composable.
117
+ // The 'from' property is the path to the source file.
118
+ return ( imp . as || imp . name ) === 'useNuxtifyConfig' && imp . from . includes ( '@nuxtify/core' )
119
+ } ,
120
+ )
121
+
122
+ if ( coreImportIndex > - 1 ) {
123
+ imports . splice ( coreImportIndex , 1 )
124
+ if ( _options . verboseLogs ) console . log ( '[nuxtify-pages] Intentionally overriding useNuxtifyConfig from @nuxtify/core.' )
125
+ }
126
+ } )
108
127
} ,
109
128
} )
You can’t perform that action at this time.
0 commit comments