Skip to content

Commit 1288512

Browse files
committed
use ssl cert from mini localhost CA
1 parent 679ff8c commit 1288512

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

vite.config.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import { createHtmlPlugin } from "vite-plugin-html";
1111
import { codecovVitePlugin } from "@codecov/vite-plugin";
1212
import { sentryVitePlugin } from "@sentry/vite-plugin";
1313
import react from "@vitejs/plugin-react";
14-
import basicSsl from "@vitejs/plugin-basic-ssl";
1514
import { realpathSync } from "fs";
15+
import * as fs from "node:fs";
1616

1717
// https://vitejs.dev/config/
1818
export default defineConfig(({ mode, packageType }) => {
@@ -24,7 +24,6 @@ export default defineConfig(({ mode, packageType }) => {
2424
process.env.VITE_PACKAGE = packageType ?? "full";
2525
const plugins = [
2626
react(),
27-
basicSsl(),
2827
svgrPlugin({
2928
svgrOptions: {
3029
// This enables ref forwarding on SVGR components, which is needed, for
@@ -83,7 +82,11 @@ export default defineConfig(({ mode, packageType }) => {
8382
return {
8483
server: {
8584
port: 3000,
86-
fs: { allow },
85+
fs: { allow },
86+
https: {
87+
key: fs.readFileSync('./backend/dev_tls_m.localhost.key'),
88+
cert: fs.readFileSync('./backend/dev_tls_m.localhost.crt'),
89+
},
8790
},
8891
build: {
8992
sourcemap: true,

0 commit comments

Comments
 (0)