fix(kit): resolve aliases in plugin src (#6037)

This commit is contained in:
Daniel Roe 2022-07-21 15:05:41 +01:00 committed by GitHub
parent 45c2a6118f
commit 4d80c43d25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,6 +2,7 @@ import { normalize } from 'pathe'
import type { NuxtPlugin, NuxtPluginTemplate } from '@nuxt/schema'
import { useNuxt } from './context'
import { addTemplate } from './template'
import { resolveAlias } from './resolve'
/**
* Normalize a nuxt plugin object
@ -19,7 +20,7 @@ export function normalizePlugin (plugin: NuxtPlugin | string): NuxtPlugin {
}
// Normalize full path to plugin
plugin.src = normalize(plugin.src)
plugin.src = normalize(resolveAlias(plugin.src))
// Normalize mode
if (plugin.ssr) {