DDRCompanion/vite.config.ts

37 lines
843 B
TypeScript
Raw Normal View History

2024-05-14 21:03:59 +00:00
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react-swc";
import { VitePWA } from "vite-plugin-pwa";
import basicSsl from "@vitejs/plugin-basic-ssl";
2024-05-15 22:29:17 +00:00
const baseUrls = {
production: "/ddr",
staging: "/ddr-staging",
};
export default defineConfig(({ mode }) => ({
base: baseUrls[mode],
2024-05-16 04:37:23 +00:00
build: {},
2024-05-14 21:03:59 +00:00
server: {
https: {},
},
plugins: [
react(),
2024-05-15 17:57:16 +00:00
VitePWA({
registerType: "autoUpdate",
manifest: {
icons: [{ src: "pwa-192x192.png", purpose: "any", sizes: "192x192" }],
},
2024-05-16 01:04:15 +00:00
includeAssets: ["public/bannerImages/*"],
2024-05-15 17:57:16 +00:00
}),
2024-05-14 21:03:59 +00:00
basicSsl({
/** name of certification */
name: "test",
/** custom trust domains */
domains: ["*.custom.com"],
/** custom certification directory */
certDir: "/Users/.../.devServer/cert",
}),
],
2024-05-15 22:29:17 +00:00
}));