提交 d89f766b 编写于 作者: U ULIVZ

fix($core): fix windows output path issue

上级 0ed90d21
......@@ -26,7 +26,7 @@ module.exports = async function build (sourceDir, cliOptions = {}) {
return console.error(logger.error(chalk.red('Unexpected option: outDir cannot be set to the current working directory.\n'), false))
}
await fs.remove(outDir)
logger.debug('Dist directory: ' + chalk.gray(path.resolve(process.cwd(), outDir)))
logger.debug('Dist directory: ' + chalk.gray(require('path').resolve(process.cwd(), outDir)))
let clientConfig = createClientConfig(options, cliOptions).toConfig()
let serverConfig = createServerConfig(options, cliOptions).toConfig()
......
......@@ -52,8 +52,8 @@ module.exports = class AppContext {
this.base = this.siteConfig.base || '/'
this.themeConfig = this.siteConfig.themeConfig || {}
this.outDir = this.siteConfig.dest
? path.resolve(process.cwd(), this.siteConfig.dest)
: path.resolve(sourceDir, '.vuepress/dist')
? require('path').resolve(process.cwd(), this.siteConfig.dest)
: require('path').resolve(sourceDir, '.vuepress/dist')
this.pluginAPI = new PluginAPI(this)
this.pages = [] // Array<Page>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册