From 38ecb085c05c7ee0ccaac7eecee514bd73e3bb9e Mon Sep 17 00:00:00 2001 From: Parksangwoo Date: Sun, 25 Aug 2024 20:04:53 +0900 Subject: [PATCH] =?UTF-8?q?setting:=20=EB=A1=9C=EC=BB=AC=20/=20=EB=B0=B0?= =?UTF-8?q?=ED=8F=AC=20=ED=99=98=EA=B2=BD=EC=97=90=20=EB=94=B0=EB=9D=BC=20?= =?UTF-8?q?https=20=ED=99=98=EA=B2=BD=20=EC=84=A4=EC=A0=95=20=EB=B6=84?= =?UTF-8?q?=EA=B8=B0=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vite.config.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/vite.config.ts b/vite.config.ts index aaa27c8..3df716f 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -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: {},