import { defineConfig } from "vite"; import vue from "@vitejs/plugin-vue"; import path from "path"; // https://vitejs.dev/config/ export default defineConfig({ plugins: [vue()], server: { host: "0.0.0.0", port: 5588, open: true, }, resolve: { // 配置路径别名 alias: { "@": path.resolve(__dirname, "./src"), }, }, build: { minify: "terser", terserOptions: { compress: { // 生产环境时移除 console pure_funcs: ["console.log"], }, }, }, });