doocus first ver
This commit is contained in:
29
ui/doocus-app/vite.config.ts
Normal file
29
ui/doocus-app/vite.config.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
import { doocusApi } from './server/doocusApi'
|
||||
|
||||
// Output directory produced by the doocus pipeline (process_doc.py /
|
||||
// ctrl/batch_docs.sh). Override with DOOCUS_OUTPUT.
|
||||
const outputDir = process.env.DOOCUS_OUTPUT
|
||||
?? fileURLToPath(new URL('../../docs-output', import.meta.url))
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [vue(), doocusApi({ outputDir })],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@framework': fileURLToPath(new URL('../framework/src', import.meta.url)),
|
||||
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
||||
},
|
||||
},
|
||||
server: {
|
||||
fs: {
|
||||
// Allow the dev server to read the framework source and the docs-output tree.
|
||||
allow: [
|
||||
fileURLToPath(new URL('.', import.meta.url)),
|
||||
fileURLToPath(new URL('../framework', import.meta.url)),
|
||||
outputDir,
|
||||
],
|
||||
},
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user