use ssl cert from mini localhost CA

This commit is contained in:
fkwp
2025-05-05 16:01:58 +02:00
parent 679ff8c2af
commit 128851263b

View File

@@ -11,8 +11,8 @@ import { createHtmlPlugin } from "vite-plugin-html";
import { codecovVitePlugin } from "@codecov/vite-plugin";
import { sentryVitePlugin } from "@sentry/vite-plugin";
import react from "@vitejs/plugin-react";
import basicSsl from "@vitejs/plugin-basic-ssl";
import { realpathSync } from "fs";
import * as fs from "node:fs";
// https://vitejs.dev/config/
export default defineConfig(({ mode, packageType }) => {
@@ -24,7 +24,6 @@ export default defineConfig(({ mode, packageType }) => {
process.env.VITE_PACKAGE = packageType ?? "full";
const plugins = [
react(),
basicSsl(),
svgrPlugin({
svgrOptions: {
// This enables ref forwarding on SVGR components, which is needed, for
@@ -83,7 +82,11 @@ export default defineConfig(({ mode, packageType }) => {
return {
server: {
port: 3000,
fs: { allow },
fs: { allow },
https: {
key: fs.readFileSync('./backend/dev_tls_m.localhost.key'),
cert: fs.readFileSync('./backend/dev_tls_m.localhost.crt'),
},
},
build: {
sourcemap: true,