Read the SSL-dev.md to configure your SSL
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user