Change config so that the localhost certificate are to be present in the vue app folder
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -1,3 +1,7 @@
|
||||
# Ignore cert localhost
|
||||
localhost-key.pem
|
||||
localhost.pem
|
||||
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
|
||||
@@ -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',
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user