初始化项目

This commit is contained in:
BBIT-Kai
2026-04-30 10:47:26 +08:00
commit c932419c73
147 changed files with 45298 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
import { defineConfig, loadEnv } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'node:path'
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), '')
const proxyTarget = env.VITE_API_PROXY_TARGET
return {
plugins: [vue()],
resolve: {
alias: {
'@': path.resolve(__dirname, './src')
}
},
server: {
host: '0.0.0.0',
port: 5173,
open: false,
proxy: proxyTarget
? {
'/api': {
target: proxyTarget,
changeOrigin: true
}
}
: undefined
},
preview: {
host: '0.0.0.0',
port: 4173
}
}
})