42 lines
804 B
TypeScript
42 lines
804 B
TypeScript
import vue from "@vitejs/plugin-vue";
|
|
import { resolve } from "path";
|
|
import { defineConfig } from "vite";
|
|
|
|
export default defineConfig({
|
|
plugins: [vue()],
|
|
resolve: {
|
|
alias: {
|
|
"@": resolve(__dirname, "src"),
|
|
},
|
|
},
|
|
build: {
|
|
target: "es2020",
|
|
cssCodeSplit: true,
|
|
chunkSizeWarningLimit: 500,
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
"ant-design-vue": ["ant-design-vue"],
|
|
"vue-vendor": ["vue", "vue-router", "pinia"],
|
|
},
|
|
},
|
|
},
|
|
terserOptions: {
|
|
compress: {
|
|
drop_console: true,
|
|
drop_debugger: true,
|
|
},
|
|
},
|
|
},
|
|
server: {
|
|
host: "0.0.0.0",
|
|
port: 5175,
|
|
proxy: {
|
|
"/api": {
|
|
target: "http://localhost:8080",
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
});
|