初始化项目文件
This commit is contained in:
38
web_vue/vite.config.ts
Normal file
38
web_vue/vite.config.ts
Normal file
@ -0,0 +1,38 @@
|
||||
import { defineConfig, splitVendorChunkPlugin } from "vite";
|
||||
import vue from "@vitejs/plugin-vue";
|
||||
import { resolve } from "path";
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [vue(), splitVendorChunkPlugin()],
|
||||
resolve: {
|
||||
alias: {
|
||||
"@": resolve(__dirname, "src"),
|
||||
},
|
||||
},
|
||||
server: {
|
||||
host: "0.0.0.0",
|
||||
proxy: {
|
||||
"/api_django": {
|
||||
target: "http://localhost:8000/api/",
|
||||
rewrite: (path) => path.replace(/^\/api_django/, ""),
|
||||
changeOrigin: true,
|
||||
},
|
||||
"/api": {
|
||||
target: "http://localhost:8080",
|
||||
changeOrigin: true,
|
||||
},
|
||||
"/api_file": {
|
||||
target: "http://localhost:8081",
|
||||
changeOrigin: true,
|
||||
},
|
||||
"/admin": {
|
||||
target: "http://localhost:8080",
|
||||
changeOrigin: true,
|
||||
},
|
||||
"/static": {
|
||||
target: "https://git-ylsa0.cn",
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
Reference in New Issue
Block a user