mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
fix(kit): normalize plugin imports paths (#1779)
This commit is contained in:
parent
c577e1991e
commit
82d1741d52
@ -1,5 +1,5 @@
|
||||
import { existsSync, promises as fsp } from 'fs'
|
||||
import { basename, extname, parse, resolve } from 'pathe'
|
||||
import { basename, extname, normalize, parse, resolve } from 'pathe'
|
||||
import lodashTemplate from 'lodash.template'
|
||||
import hash from 'hash-sum'
|
||||
import { pascalCase, camelCase, kebabCase } from 'scule'
|
||||
@ -90,6 +90,9 @@ export function normalizePlugin (plugin: NuxtPlugin | string): NuxtPlugin {
|
||||
throw new Error('Invalid plugin. src option is required: ' + JSON.stringify(plugin))
|
||||
}
|
||||
|
||||
// Normalize full path to plugin
|
||||
plugin.src = normalize(plugin.src)
|
||||
|
||||
// Normalize mode
|
||||
if (plugin.ssr) {
|
||||
plugin.mode = 'server'
|
||||
|
Loading…
Reference in New Issue
Block a user