Read the SSL-dev.md to configure your SSL

This commit is contained in:
2024-10-08 00:11:52 -04:00
parent b0443fb738
commit 294b41d380
2 changed files with 146 additions and 0 deletions

View File

@@ -2,6 +2,8 @@ import {fileURLToPath, URL} from 'node:url'
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}) => {
@@ -12,6 +14,13 @@ export default defineConfig(({mode}) => {
vue(),
svgLoader()
],
server: {
https: {
key: fs.readFileSync(path.resolve(__dirname, 'c:/git/localhost-key.pem')),
cert: fs.readFileSync(path.resolve(__dirname, 'c:/git/localhost.pem')),
},
host: 'localhost',
},
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))