Skip to content

Commit d89f766

Browse files
committed
fix($core): fix windows output path issue
1 parent 0ed90d2 commit d89f766

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/@vuepress/core/lib/build.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ module.exports = async function build (sourceDir, cliOptions = {}) {
2626
return console.error(logger.error(chalk.red('Unexpected option: outDir cannot be set to the current working directory.\n'), false))
2727
}
2828
await fs.remove(outDir)
29-
logger.debug('Dist directory: ' + chalk.gray(path.resolve(process.cwd(), outDir)))
29+
logger.debug('Dist directory: ' + chalk.gray(require('path').resolve(process.cwd(), outDir)))
3030

3131
let clientConfig = createClientConfig(options, cliOptions).toConfig()
3232
let serverConfig = createServerConfig(options, cliOptions).toConfig()

packages/@vuepress/core/lib/prepare/AppContext.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ module.exports = class AppContext {
5252
this.base = this.siteConfig.base || '/'
5353
this.themeConfig = this.siteConfig.themeConfig || {}
5454
this.outDir = this.siteConfig.dest
55-
? path.resolve(process.cwd(), this.siteConfig.dest)
56-
: path.resolve(sourceDir, '.vuepress/dist')
55+
? require('path').resolve(process.cwd(), this.siteConfig.dest)
56+
: require('path').resolve(sourceDir, '.vuepress/dist')
5757

5858
this.pluginAPI = new PluginAPI(this)
5959
this.pages = [] // Array<Page>

0 commit comments

Comments
 (0)