mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-30 11:47:55 +01:00
fix(module): merge user's options when installing modules
This commit is contained in:
@@ -85,7 +85,7 @@ export default defineNuxtModule<ModuleOptions>({
|
|||||||
|
|
||||||
async function registerModule(name: string, key: string, options: Record<string, any>) {
|
async function registerModule(name: string, key: string, options: Record<string, any>) {
|
||||||
if (!hasNuxtModule(name)) {
|
if (!hasNuxtModule(name)) {
|
||||||
await installModule(name, options)
|
await installModule(name, defu((nuxt.options as any)[key], options))
|
||||||
} else {
|
} else {
|
||||||
(nuxt.options as any)[key] = defu((nuxt.options as any)[key], options)
|
(nuxt.options as any)[key] = defu((nuxt.options as any)[key], options)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user