forked from SUSUSSG/PenGreenLiveFrontEnd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.js
41 lines (39 loc) · 863 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
31
32
33
34
35
36
37
38
39
40
41
// vite.config.js
import { defineConfig } from "vite";
import path from "path";
import Vue from "@vitejs/plugin-vue";
import ViteImages from "vite-plugin-vue-images";
const host = "localhost";
const port = "8090";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
Vue(),
ViteImages({
dirs: ["src/assets/images"],
}),
],
define: {
'process.env': process.env
},
resolve: {
extensions: [".mjs", ".js", ".ts", ".jsx", ".tsx", ".json", ".vue", ".css", ".svg", ".png", ".jpg"],
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
server: {
host: true,
proxy: {
'/api/': {
target: `http://${host}:${port}`,
changeOrigin: true,
},
'/ws/': {
target: `ws://${host}:${port}`,
changeOrigin: false,
ws: true,
},
}
}
});