fix(kit): add external module to transpile (#8963)

This commit is contained in:
Mehdi HosseinZade 2022-11-15 18:25:45 +03:30 committed by GitHub
parent 2c2fbdffc9
commit f530cd7413
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,6 +11,10 @@ export async function installModule (moduleToInstall: string | NuxtModule, _inli
// Call module
await nuxtModule(inlineOptions, nuxt)
if (typeof moduleToInstall === 'string') {
nuxt.options.build.transpile.push(moduleToInstall)
}
nuxt.options._installedModules = nuxt.options._installedModules || []
nuxt.options._installedModules.push({
meta: await nuxtModule.getMeta?.(),