Skip to content

Commit 7076804

Browse files
authored
Merge pull request #109 from Soohyuniii/feature/파일이-존재할-경우에만-로드하도록-조건-추가
fix: https 조건 수정
2 parents 3735b84 + 1a7343f commit 7076804

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

vite.config.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,11 @@ export default defineConfig(({ mode }: { mode: string }) => {
2222
host: "mbtips.kr",
2323
protocol: "wss"
2424
},
25-
https:
26-
!isProduction && fs.existsSync(keyPath) && fs.existsSync(certPath)
27-
? undefined // 배포 환경에서는 HTTPS를 비활성화 (Nginx가 처리)
28-
: {
29-
key: fs.readFileSync(keyPath),
30-
cert: fs.readFileSync(certPath)
31-
}
25+
https: isProduction
26+
? undefined // 배포 환경에서는 HTTPS를 비활성화 (Nginx가 처리)
27+
: fs.existsSync(keyPath) && fs.existsSync(certPath)
28+
? { key: fs.readFileSync(keyPath), cert: fs.readFileSync(certPath) }
29+
: undefined
3230
},
3331
plugins: [react(), tailwindcss()],
3432
resolve: {

0 commit comments

Comments
 (0)