chore: path separator normalization in assetsDir

pull/3233/head
Divyansh Singh 1 year ago
parent 134ca6c661
commit a12a00ca78

@ -13,6 +13,7 @@ import { DEFAULT_THEME_PATH } from './alias'
import { resolvePages } from './plugins/dynamicRoutesPlugin' import { resolvePages } from './plugins/dynamicRoutesPlugin'
import { import {
APPEARANCE_KEY, APPEARANCE_KEY,
slash,
type DefaultTheme, type DefaultTheme,
type HeadConfig, type HeadConfig,
type SiteData type SiteData
@ -74,7 +75,7 @@ export async function resolveConfig(
const site = await resolveSiteData(root, userConfig) const site = await resolveSiteData(root, userConfig)
const srcDir = normalizePath(path.resolve(root, userConfig.srcDir || '.')) const srcDir = normalizePath(path.resolve(root, userConfig.srcDir || '.'))
const assetsDir = userConfig.assetsDir const assetsDir = userConfig.assetsDir
? userConfig.assetsDir.replace(/^\.?\/|\/$/g, '') ? slash(userConfig.assetsDir).replace(/^\.?\/|\/$/g, '')
: 'assets' : 'assets'
const outDir = userConfig.outDir const outDir = userConfig.outDir
? normalizePath(path.resolve(root, userConfig.outDir)) ? normalizePath(path.resolve(root, userConfig.outDir))

Loading…
Cancel
Save