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: {},