From 85d29bd0d219555353d7e00d7d97092a2b23ae37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Coletta?= Date: Wed, 27 Dec 2023 23:00:31 +0100 Subject: [PATCH] fix: Fix incorrect resolver path --- packages/nuxt-kit/src/module.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/nuxt-kit/src/module.ts b/packages/nuxt-kit/src/module.ts index 342ec3e..6c82c7b 100644 --- a/packages/nuxt-kit/src/module.ts +++ b/packages/nuxt-kit/src/module.ts @@ -2,8 +2,8 @@ import { addImports, addPluginTemplate, addTemplate, + createResolver, defineNuxtModule, - resolvePath, } from '@nuxt/kit' import type { NuxtModule } from '@nuxt/schema' import { join } from 'pathe' @@ -39,7 +39,8 @@ export default > defineNuxtModule({ readOnly: true, }, async setup(opts, nuxt) { - const resolveRuntimeModule = (path: string) => join(resolvePath('./runtime'), path) + const resolver = createResolver(import.meta.url) + const resolveRuntimeModule = (path: string) => join(resolver.resolve('./runtime'), path) // Inject options via virtual template nuxt.options.alias['#lyonkit'] = addTemplate({