use ssl cert from mini localhost CA
This commit is contained in:
@@ -11,8 +11,8 @@ import { createHtmlPlugin } from "vite-plugin-html";
|
|||||||
import { codecovVitePlugin } from "@codecov/vite-plugin";
|
import { codecovVitePlugin } from "@codecov/vite-plugin";
|
||||||
import { sentryVitePlugin } from "@sentry/vite-plugin";
|
import { sentryVitePlugin } from "@sentry/vite-plugin";
|
||||||
import react from "@vitejs/plugin-react";
|
import react from "@vitejs/plugin-react";
|
||||||
import basicSsl from "@vitejs/plugin-basic-ssl";
|
|
||||||
import { realpathSync } from "fs";
|
import { realpathSync } from "fs";
|
||||||
|
import * as fs from "node:fs";
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig(({ mode, packageType }) => {
|
export default defineConfig(({ mode, packageType }) => {
|
||||||
@@ -24,7 +24,6 @@ export default defineConfig(({ mode, packageType }) => {
|
|||||||
process.env.VITE_PACKAGE = packageType ?? "full";
|
process.env.VITE_PACKAGE = packageType ?? "full";
|
||||||
const plugins = [
|
const plugins = [
|
||||||
react(),
|
react(),
|
||||||
basicSsl(),
|
|
||||||
svgrPlugin({
|
svgrPlugin({
|
||||||
svgrOptions: {
|
svgrOptions: {
|
||||||
// This enables ref forwarding on SVGR components, which is needed, for
|
// This enables ref forwarding on SVGR components, which is needed, for
|
||||||
@@ -83,7 +82,11 @@ export default defineConfig(({ mode, packageType }) => {
|
|||||||
return {
|
return {
|
||||||
server: {
|
server: {
|
||||||
port: 3000,
|
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: {
|
build: {
|
||||||
sourcemap: true,
|
sourcemap: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user