first commit

This commit is contained in:
2025-09-23 07:35:11 +00:00
commit a5dd3f1335
110 changed files with 46108 additions and 0 deletions

55
vite.config.ts Executable file
View File

@@ -0,0 +1,55 @@
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'
import Inspector from 'unplugin-vue-dev-locator/vite'
import xiPlusBadge from 'vite-plugin-xi-plus-badge'
// https://vite.dev/config/
export default defineConfig({
build: {
sourcemap: 'hidden',
},
plugins: [
vue(),
Inspector(),
xiPlusBadge({
text: 'XI PLUS', // 角标文本
link: 'https://xi.plus', // 点击跳转链接
position: 'bottom-right', // 角标位置
showInDev: true, // 开发环境显示
showInProd: true // 生产环境显示
})
],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'), // ✅ 定义 @ = src
},
},
server: {
host: '0.0.0.0',
port: 5174,
proxy: {
'/api': {
target: 'http://localhost:4001',
changeOrigin: true,
secure: false,
configure: (proxy, _options) => {
proxy.on('error', (err, _req, _res) => {
console.log('proxy error', err);
});
proxy.on('proxyReq', (proxyReq, req, _res) => {
console.log('Sending Request to the Target:', req.method, req.url);
});
proxy.on('proxyRes', (proxyRes, req, _res) => {
console.log('Received Response from the Target:', proxyRes.statusCode, req.url);
});
},
},
'/uploads': {
target: 'http://localhost:4001',
changeOrigin: true,
secure: false
}
}
}
})