DDRCompanion/vite.config.ts
Michael Zhang 0252fb337d
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
weird sql error
2024-05-16 01:22:26 -05:00

36 lines
860 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: { sourcemap: true },
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",
}),
],
}));