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 01e00963bc
commit 33e2d0a5f3
No known key found for this signature in database
GPG Key ID: CBC814C393D93268

View File

@ -79,7 +79,7 @@ export async function loadNuxtModuleInstance (nuxtModule: string | NuxtModule, n
// Import if input is string // Import if input is string
if (typeof nuxtModule === '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 let error: unknown
for (const path of paths) { for (const path of paths) {
try { try {