-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvite.config.ts
41 lines (40 loc) ยท 1.06 KB
/
vite.config.ts
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
import react from "@vitejs/plugin-react-swc";
import * as path from "path";
import { defineConfig } from "vite";
import vitePluginSvgr from "vite-plugin-svgr";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react(), vitePluginSvgr()],
define: {
global: "window",
},
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
build: {
rollupOptions: {
// external: ["react", "react-dom", "styled-components"],
},
},
base: "/KUIT-Space-front/",
server: {
proxy: {
"/api": {
target: "https://project-space.xyz",
//changeOrigin: true, //false์ฌ์ผ proxy ์ ์ ์๋
// ์์ฒญ ๊ฒฝ๋ก์์ '/api' ์ ๊ฑฐ
rewrite: (path) => path.replace(/^\/api/, ""),
// SSL ์ธ์ฆ์ ๊ฒ์ฆ ๋ฌด์
secure: false,
// WebSocket ํ๋กํ ์ฝ ์ฌ์ฉ
ws: true,
},
"/image": {
target: "https://project-space-image-storage.s3.ap-northeast-2.amazonaws.com",
rewrite: (path) => path.replace(/^\/image/, ""),
},
},
},
});