forked from plango2025/plango-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
39 lines (38 loc) · 1.17 KB
/
vite.config.ts
File metadata and controls
39 lines (38 loc) · 1.17 KB
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
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import {fileURLToPath, URL} from 'url'
// https://vite.dev/config/
export default defineConfig({
server: {
proxy: {
"/api": {
target: "http://13.238.28.77:8080", // 백엔드 주소
changeOrigin: true,
secure: false, //http 니깐깐
},
},
},
//위 코드는 실제로 "http://13.238.28.77:8080" 이 주소로 요청이 가게 만든다.
plugins: [react()],
resolve: {
alias: {
"@": fileURLToPath(new URL("./src", import.meta.url)),
"@assets": fileURLToPath(new URL("./src/assets", import.meta.url)),
"@components": fileURLToPath(
new URL("./src/components", import.meta.url)
),
"@pages": fileURLToPath(new URL("./src/pages", import.meta.url)),
"@types": fileURLToPath(new URL("./src/types", import.meta.url)),
"@recoil": fileURLToPath(new URL("./src/recoil", import.meta.url)),
"@apis": fileURLToPath(new URL("./src/apis", import.meta.url)),
},
},
//SCSS 전역 사용
css: {
preprocessorOptions: {
scss: {
additionalData: `@use "@assets/styles/main";`,
},
},
},
});