Skip to content

Commit

Permalink
fix: Fix incorrect resolver path
Browse files Browse the repository at this point in the history
  • Loading branch information
leo91000 committed Dec 27, 2023
1 parent 657dfc6 commit 85d29bd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/nuxt-kit/src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import {
addImports,
addPluginTemplate,
addTemplate,
createResolver,
defineNuxtModule,
resolvePath,
} from '@nuxt/kit'
import type { NuxtModule } from '@nuxt/schema'
import { join } from 'pathe'
Expand Down Expand Up @@ -39,7 +39,8 @@ export default <NuxtModule<ModuleOptions>> defineNuxtModule<ModuleOptions>({
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({
Expand Down

0 comments on commit 85d29bd

Please sign in to comment.