Snavigation/vite.config.js

29 lines
535 B
JavaScript
Raw Normal View History

2023-07-27 09:33:15 +00:00
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"],
},
},
},
});