Skip to content
This repository was archived by the owner on Apr 6, 2023. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/kit/src/module/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ export async function installModule (moduleToInstall: string | NuxtModule, _inli

if (typeof moduleToInstall === 'string') {
nuxt.options.build.transpile.push(moduleToInstall)
} else if (moduleToInstall.getMeta) {
const meta = await moduleToInstall.getMeta()
if (meta.name) {
nuxt.options.build.transpile.push(meta.name)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is dangerous and error prune. Name of module can be integration/library name not npm package of nuxt modue itself.

}
}

nuxt.options._installedModules = nuxt.options._installedModules || []
Expand Down