fix: set tempDir outside package root

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/439/head
Jonas 4 years ago committed by GitHub
parent ea6cb00c3e
commit d50a2e6871
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -16,7 +16,7 @@ import {
LocaleConfig,
createLangDictionary
} 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'
@ -122,7 +122,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