Skip to content

Commit

Permalink
setting: 로컬 / 배포 환경에 따라 https 환경 설정 분기 처리
Browse files Browse the repository at this point in the history
  • Loading branch information
SangWoo9734 committed Aug 25, 2024
1 parent d92ed50 commit 38ecb08
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@ export default defineConfig({
server: {
host: '0.0.0.0',
port: 5173,
https: {
key: fs.readFileSync(path.resolve('./cert', 'localhost-key.pem')),
cert: fs.readFileSync(path.resolve('./cert', 'localhost.pem')),
},
https:
process.env.VITE_MODE === 'production'
? {}
: {
key: fs.readFileSync(path.resolve('./cert', 'localhost-key.pem')),
cert: fs.readFileSync(path.resolve('./cert', 'localhost.pem')),
},
},
define: {
global: {},
Expand Down

0 comments on commit 38ecb08

Please sign in to comment.