fix(nuxt3): properly pass inline options to installModule

This commit is contained in:
Pooya Parsa 2021-12-21 22:26:03 +01:00
parent 804b323010
commit b41a1d2d18

View File

@ -67,8 +67,11 @@ async function initNuxt (nuxt: Nuxt) {
}) })
for (const m of modulesToInstall) { for (const m of modulesToInstall) {
const inlineOptions = Array.isArray(m) ? m[1] : {} if (Array.isArray(m)) {
await installModule(m, inlineOptions, nuxt) await installModule(m[0], m[1], nuxt)
} else {
await installModule(m, {}, nuxt)
}
} }
await nuxt.callHook('modules:done', { nuxt } as ModuleContainer) await nuxt.callHook('modules:done', { nuxt } as ModuleContainer)