Skip to content

Commit

Permalink
chore: path separator normalization in assetDirs
Browse files Browse the repository at this point in the history
  • Loading branch information
brc-dd committed Nov 18, 2023
1 parent 134ca6c commit fe095d0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/node/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { DEFAULT_THEME_PATH } from './alias'
import { resolvePages } from './plugins/dynamicRoutesPlugin'
import {
APPEARANCE_KEY,
slash,
type DefaultTheme,
type HeadConfig,
type SiteData
Expand Down Expand Up @@ -74,7 +75,7 @@ export async function resolveConfig(
const site = await resolveSiteData(root, userConfig)
const srcDir = normalizePath(path.resolve(root, userConfig.srcDir || '.'))
const assetsDir = userConfig.assetsDir
? userConfig.assetsDir.replace(/^\.?\/|\/$/g, '')
? slash(userConfig.assetsDir).replace(/^\.?\/|\/$/g, '')
: 'assets'
const outDir = userConfig.outDir
? normalizePath(path.resolve(root, userConfig.outDir))
Expand Down

0 comments on commit fe095d0

Please sign in to comment.