From 128851263b2191090926eb3e9bad0daf77b9a81f Mon Sep 17 00:00:00 2001 From: fkwp Date: Mon, 5 May 2025 16:01:58 +0200 Subject: [PATCH] use ssl cert from mini localhost CA --- vite.config.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/vite.config.js b/vite.config.js index 590f3c16..4985e75a 100644 --- a/vite.config.js +++ b/vite.config.js @@ -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,