|
|
@ -1,6 +1,12 @@
|
|
|
|
import path from 'path'
|
|
|
|
import path from 'path'
|
|
|
|
import c from 'picocolors'
|
|
|
|
import c from 'picocolors'
|
|
|
|
import { defineConfig, mergeConfig, Plugin, ResolvedConfig } from 'vite'
|
|
|
|
import {
|
|
|
|
|
|
|
|
defineConfig,
|
|
|
|
|
|
|
|
mergeConfig,
|
|
|
|
|
|
|
|
searchForWorkspaceRoot,
|
|
|
|
|
|
|
|
Plugin,
|
|
|
|
|
|
|
|
ResolvedConfig
|
|
|
|
|
|
|
|
} from 'vite'
|
|
|
|
import { SiteConfig } from './config'
|
|
|
|
import { SiteConfig } from './config'
|
|
|
|
import { createMarkdownToVueRenderFn, clearCache } from './markdownToVue'
|
|
|
|
import { createMarkdownToVueRenderFn, clearCache } from './markdownToVue'
|
|
|
|
import {
|
|
|
|
import {
|
|
|
@ -117,7 +123,11 @@ export async function createVitePressPlugin(
|
|
|
|
},
|
|
|
|
},
|
|
|
|
server: {
|
|
|
|
server: {
|
|
|
|
fs: {
|
|
|
|
fs: {
|
|
|
|
allow: [DIST_CLIENT_PATH, srcDir, process.cwd()]
|
|
|
|
allow: [
|
|
|
|
|
|
|
|
DIST_CLIENT_PATH,
|
|
|
|
|
|
|
|
srcDir,
|
|
|
|
|
|
|
|
searchForWorkspaceRoot(process.cwd())
|
|
|
|
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|