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
|
||||||
logs
|
logs
|
||||||
*.log
|
*.log
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import {defineConfig, loadEnv} from 'vite'
|
|||||||
import vue from '@vitejs/plugin-vue'
|
import vue from '@vitejs/plugin-vue'
|
||||||
import svgLoader from 'vite-svg-loader'
|
import svgLoader from 'vite-svg-loader'
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import path from 'path';
|
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig(({mode}) => {
|
export default defineConfig(({mode}) => {
|
||||||
@@ -16,8 +15,8 @@ export default defineConfig(({mode}) => {
|
|||||||
],
|
],
|
||||||
server: {
|
server: {
|
||||||
https: {
|
https: {
|
||||||
key: fs.readFileSync(path.resolve(__dirname, 'c:/git/localhost-key.pem')),
|
key: fs.readFileSync('localhost-key.pem'),
|
||||||
cert: fs.readFileSync(path.resolve(__dirname, 'c:/git/localhost.pem')),
|
cert: fs.readFileSync('localhost.pem'),
|
||||||
},
|
},
|
||||||
host: 'localhost',
|
host: 'localhost',
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user