File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -54,13 +54,20 @@ export default defineNuxtModule<ModuleOptions>({
54
54
throw new TypeError ( '`customize` callback can\'t not be set in module options, use `app.config.ts` or component props instead.' )
55
55
}
56
56
57
+ // Use `server` provider when SSR is disabled or generate mode
57
58
if ( ! options . provider ) {
58
- // Use `server` provider when SSR is disabled or generate mode
59
59
options . provider = ( ! nuxt . options . ssr || nuxt . options . _generate )
60
60
? 'iconify'
61
61
: 'server'
62
62
}
63
63
64
+ // In some monorepo, `@iconify/vue` might be bundled twice which does not share the loaded data
65
+ nuxt . options . vite ||= { }
66
+ nuxt . options . vite . resolve ||= { }
67
+ nuxt . options . vite . resolve . dedupe ||= [ ]
68
+ nuxt . options . vite . resolve . dedupe . push ( '@iconify/vue' )
69
+
70
+ // Create context
64
71
const ctx = new NuxtIconModuleContext ( nuxt , options )
65
72
66
73
addPlugin (
@@ -90,7 +97,6 @@ export default defineNuxtModule<ModuleOptions>({
90
97
nuxt . options . appConfig . icon || { } ,
91
98
runtimeOptions ,
92
99
)
93
-
94
100
// Define types for the app.config compatible with Nuxt Studio
95
101
nuxt . hook ( 'schema:extend' , ( schemas ) => {
96
102
schemas . push ( {
You can’t perform that action at this time.
0 commit comments