feat(ui): 管理后台基础配置

This commit is contained in:
廖彦棋
2024-03-06 10:23:55 +08:00
parent a335b965d0
commit 06fa54fd25
33 changed files with 583 additions and 527 deletions

View File

@@ -1,18 +1,32 @@
import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import { defineConfig, loadEnv } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueJsx from '@vitejs/plugin-vue-jsx'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue(),
vueJsx(),
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
export default defineConfig(({ mode }) => {
const { VITE_PROXY_BASE_URL, VITE_TARGET_URL } = loadEnv(mode, process.cwd());
return {
plugins: [
vue(),
vueJsx(),
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
},
server: {
host: "0.0.0.0",
port: 7410,
proxy: {
[VITE_PROXY_BASE_URL]: {
target: VITE_TARGET_URL,
changeOrigin: true,
rewrite: (path) => path.replace(VITE_PROXY_BASE_URL, ""),
},
},
},
}
})