DDRCompanion/vite.config.ts
2024-05-15 23:37:23 -05:00

36 lines
843 B
TypeScript

import { defineConfig } from "vite";
import react from "@vitejs/plugin-react-swc";
import { VitePWA } from "vite-plugin-pwa";
import basicSsl from "@vitejs/plugin-basic-ssl";
const baseUrls = {
production: "/ddr",
staging: "/ddr-staging",
};
export default defineConfig(({ mode }) => ({
base: baseUrls[mode],
build: {},
server: {
https: {},
},
plugins: [
react(),
VitePWA({
registerType: "autoUpdate",
manifest: {
icons: [{ src: "pwa-192x192.png", purpose: "any", sizes: "192x192" }],
},
includeAssets: ["public/bannerImages/*"],
}),
basicSsl({
/** name of certification */
name: "test",
/** custom trust domains */
domains: ["*.custom.com"],
/** custom certification directory */
certDir: "/Users/.../.devServer/cert",
}),
],
}));