mirror of
https://github.com/zyycn/codex-proxy-rs.git
synced 2026-11-06 16:06:08 +00:00
Centralize audit classifications and retention policy, move cleanup orchestration to Host, and require explicit plugin lifecycle implementations. Remove unused interfaces and redundant state, type-check the standalone plugin bridge, and split management flows by responsibility. Update architecture boundaries and add focused regression coverage. Co-authored-by: Codex <noreply@openai.com>
54 lines
1.4 KiB
TypeScript
54 lines
1.4 KiB
TypeScript
import { fileURLToPath, URL } from 'node:url'
|
|
import CodexProxyUI from '@codex-proxy/ui/vite'
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import { defineConfig } from 'vite'
|
|
import { pluginBridge } from './build/plugin-bridge.ts'
|
|
|
|
export default defineConfig(({ mode }) => {
|
|
const sourceUi = mode === 'source'
|
|
const uiRoot = new URL('../modules/ui/', import.meta.url)
|
|
|
|
return {
|
|
base: '/',
|
|
plugins: [vue(), tailwindcss(), CodexProxyUI({ source: sourceUi ? uiRoot : undefined }), pluginBridge()],
|
|
resolve: {
|
|
alias: { '@': fileURLToPath(new URL('./src', import.meta.url)) },
|
|
},
|
|
server: {
|
|
port: 5173,
|
|
proxy: {
|
|
'/dev': {
|
|
target: 'http://127.0.0.1:8080',
|
|
changeOrigin: true,
|
|
rewrite: path => path.replace(/^\/dev/, ''),
|
|
},
|
|
},
|
|
},
|
|
build: {
|
|
outDir: sourceUi ? 'node_modules/.vite/source-dist' : 'dist',
|
|
assetsDir: 'assets',
|
|
chunkSizeWarningLimit: 600,
|
|
rolldownOptions: {
|
|
checks: {
|
|
invalidAnnotation: false,
|
|
},
|
|
output: {
|
|
codeSplitting: {
|
|
groups: [
|
|
{
|
|
name: 'echarts',
|
|
test: /node_modules\/echarts/,
|
|
},
|
|
{
|
|
name: 'zrender',
|
|
test: /node_modules\/zrender/,
|
|
},
|
|
],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
}
|
|
})
|