fix(kit): handle passing 'bare' relative paths to modules

This commit is contained in:
Daniel Roe 2024-09-19 17:21:12 +01:00
parent c5a8eaae36
commit c7fecd8a1e
No known key found for this signature in database
GPG Key ID: 3714AB03996F442B

View File

@ -85,7 +85,7 @@ export async function loadNuxtModuleInstance (nuxtModule: string | NuxtModule, n
// Import if input is string
if (typeof nuxtModule === 'string') {
const paths = [join(nuxtModule, 'nuxt'), join(nuxtModule, 'module'), nuxtModule]
const paths = [join(nuxtModule, 'nuxt'), join(nuxtModule, 'module'), nuxtModule, join(nuxt.options.rootDir, nuxtModule)]
let error: unknown
for (const path of paths) {
try {