-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvite.config.ts
38 lines (37 loc) · 1 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
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react-swc";
import tsconfigPaths from "vite-tsconfig-paths";
import svgr from "vite-plugin-svgr";
import fs from "fs";
import path from "path";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
react(),
tsconfigPaths(),
svgr(),
{
name: "remove-mock-service-worker",
writeBundle: () => {
const filePath = path.resolve(__dirname, "./dist/mockServiceWorker.js");
if (fs.existsSync(filePath)) {
fs.unlinkSync(filePath);
}
},
},
],
server: {
proxy: {
"/api": {
target: "https://synergyy.link",
changeOrigin: true, // host 헤더를 변경합니다.
secure: false, // SSL 설정 (https 프로토콜)
},
"/oauth2/authorization": {
target: "https://synergyy.link",
changeOrigin: true, // host 헤더를 변경합니다.
secure: false, // SSL 설정 (https 프로토콜)
},
},
},
});