File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import fs from 'fs-extra'
3
3
import chalk from 'chalk'
4
4
import globby from 'globby'
5
5
import {
6
+ normalizePath ,
6
7
AliasOptions ,
7
8
UserConfig as ViteConfig ,
8
9
mergeConfig as mergeViteConfig
@@ -75,7 +76,7 @@ export interface SiteConfig<ThemeConfig = any> {
75
76
}
76
77
77
78
const resolve = ( root : string , file : string ) =>
78
- path . resolve ( root , `.vitepress` , file )
79
+ normalizePath ( path . resolve ( root , `.vitepress` , file ) )
79
80
80
81
export async function resolveConfig (
81
82
root : string = process . cwd ( )
@@ -127,7 +128,7 @@ export async function resolveUserConfig(root: string): Promise<UserConfig> {
127
128
const configPath = resolve ( root , 'config.js' )
128
129
const hasUserConfig = await fs . pathExists ( configPath )
129
130
// always delete cache first before loading config
130
- delete require . cache [ configPath ]
131
+ delete require . cache [ require . resolve ( configPath ) ]
131
132
const userConfig : RawConfigExports = hasUserConfig ? require ( configPath ) : { }
132
133
if ( hasUserConfig ) {
133
134
debug ( `loaded config at ${ chalk . yellow ( configPath ) } ` )
You can’t perform that action at this time.
0 commit comments