From 125863537fcb13d75d0f228973ad51c04073e8c9 Mon Sep 17 00:00:00 2001 From: Jonathan Bourdon Date: Tue, 8 Oct 2024 00:17:29 -0400 Subject: [PATCH] Change config so that the localhost certificate are to be present in the vue app folder --- .gitignore | 4 ++++ vite.config.js | 5 ++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 10a5635..8e32be8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ +# Ignore cert localhost +localhost-key.pem +localhost.pem + # Logs logs *.log diff --git a/vite.config.js b/vite.config.js index 7541861..2f31bd7 100644 --- a/vite.config.js +++ b/vite.config.js @@ -3,7 +3,6 @@ import {defineConfig, loadEnv} from 'vite' import vue from '@vitejs/plugin-vue' import svgLoader from 'vite-svg-loader' import fs from 'fs'; -import path from 'path'; // https://vitejs.dev/config/ export default defineConfig(({mode}) => { @@ -16,8 +15,8 @@ export default defineConfig(({mode}) => { ], server: { https: { - key: fs.readFileSync(path.resolve(__dirname, 'c:/git/localhost-key.pem')), - cert: fs.readFileSync(path.resolve(__dirname, 'c:/git/localhost.pem')), + key: fs.readFileSync('localhost-key.pem'), + cert: fs.readFileSync('localhost.pem'), }, host: 'localhost', },