From 3f1cea0022e24aba5640d3ab2dc96052a066b9e8 Mon Sep 17 00:00:00 2001 From: Mehdi HosseinZade Date: Tue, 15 Nov 2022 18:25:45 +0330 Subject: [PATCH] fix(kit): add external module to transpile (#8963) --- packages/kit/src/module/install.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/kit/src/module/install.ts b/packages/kit/src/module/install.ts index 961ba37b6876..df8d9554269f 100644 --- a/packages/kit/src/module/install.ts +++ b/packages/kit/src/module/install.ts @@ -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?.(),