-
Notifications
You must be signed in to change notification settings - Fork 13
/
vite.config.js
30 lines (27 loc) · 901 Bytes
/
vite.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import { fileURLToPath, URL } from "node:url";
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
"@": fileURLToPath(new URL("./src", import.meta.url)),
"@assets": fileURLToPath(new URL("./src/assets", import.meta.url)),
"@views": fileURLToPath(new URL("./src/views", import.meta.url)),
"@demos": fileURLToPath(new URL("./src/demos", import.meta.url)),
"@api": fileURLToPath(new URL("./src/api", import.meta.url)),
"@hooks": fileURLToPath(new URL("./src/hooks", import.meta.url)),
"@directives": fileURLToPath(
new URL("./src/directives", import.meta.url)
),
},
},
// 配置前端服务地址和端口
server: {
host: "0.0.0.0",
port: 5173,
// 是否开启 https
https: false,
},
});