restore frontend session

This commit is contained in:
Yisroel Baum 2026-07-31 11:05:05 +03:00
parent 24f437cac6
commit bc62a25a8e
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
11 changed files with 146 additions and 14 deletions

View file

@ -1,12 +1,30 @@
import { existsSync, readFileSync } from 'node:fs'
import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import type { ServerOptions } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueJsx from '@vitejs/plugin-vue-jsx'
import vueDevTools from 'vite-plugin-vue-devtools'
const certificateKeyPath = fileURLToPath(
new URL('../../.cert/localhost-key.pem', import.meta.url),
)
const certificatePath = fileURLToPath(
new URL('../../.cert/localhost.pem', import.meta.url),
)
const serverOptions: ServerOptions = {}
if (existsSync(certificateKeyPath) && existsSync(certificatePath)) {
serverOptions.https = {
key: readFileSync(certificateKeyPath),
cert: readFileSync(certificatePath),
}
}
// https://vite.dev/config/
export default defineConfig({
server: serverOptions,
plugins: [
vue(),
vueJsx(),