mirror of
https://github.com/caojiezi2003/Snavigation.git
synced 2024-11-10 06:39:45 +00:00
29 lines
535 B
JavaScript
29 lines
535 B
JavaScript
|
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"],
|
||
|
},
|
||
|
},
|
||
|
},
|
||
|
});
|