fix: use junctions in Windows (#1217)

pull/1218/head
Divyansh Singh 2 years ago committed by GitHub
parent 0664006e92
commit 0e14211b60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -109,7 +109,7 @@ function linkVue(root: string) {
// if user did not install vue by themselves, link VitePress' version // if user did not install vue by themselves, link VitePress' version
if (!fs.existsSync(dest)) { if (!fs.existsSync(dest)) {
const src = path.dirname(createRequire(import.meta.url).resolve('vue')) const src = path.dirname(createRequire(import.meta.url).resolve('vue'))
fs.ensureSymlinkSync(src, dest) fs.ensureSymlinkSync(src, dest, 'junction')
return () => { return () => {
fs.unlinkSync(dest) fs.unlinkSync(dest)
} }

Loading…
Cancel
Save