fix: set tempDir outside package root (#439)

package root can be read-only when install strategies like PnP are used, so the tempDir needs to be outside the vitepress package itself

close #435
pull/486/head
Jonas 4 years ago committed by GitHub
parent ae029ae9e1
commit bd35451ed4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -17,7 +17,7 @@ import {
createLangDictionary,
DefaultTheme
} from './shared'
import { resolveAliases, APP_PATH, DEFAULT_THEME_PATH } from './alias'
import { resolveAliases, DEFAULT_THEME_PATH } from './alias'
import { MarkdownOptions } from './markdown/markdown'
import _debug from 'debug'
@ -133,7 +133,7 @@ export async function resolveConfig(
pages,
configPath,
outDir: resolve(root, 'dist'),
tempDir: path.resolve(APP_PATH, 'temp'),
tempDir: resolve(root, '.tmp'),
markdown: userConfig.markdown,
alias: resolveAliases(themeDir),
vue: userConfig.vue,

Loading…
Cancel
Save