Files
create-better-t-stack/apps/cli/template/with-pwa/packages/client/vite.config.ts
Aman Varshney 66a47c7c61 Add Progressive Web App (PWA) support
Add PWA setup with vite-plugin-pwa, assets generator, and templates
Include CLI flag and interactive prompt option for PWA installation
2025-03-22 13:05:45 +05:30

36 lines
783 B
TypeScript

import tailwindcss from "@tailwindcss/vite";
import { TanStackRouterVite } from "@tanstack/router-plugin/vite";
import react from "@vitejs/plugin-react";
import path from "path";
import { defineConfig } from "vite";
import { VitePWA } from "vite-plugin-pwa";
export default defineConfig({
plugins: [
tailwindcss(),
TanStackRouterVite({}),
react(),
VitePWA({
registerType: "autoUpdate",
manifest: {
name: "My App",
short_name: "My App ",
description: "My App",
theme_color: "#0c0c0c",
},
pwaAssets: {
disabled: false,
config: true,
},
devOptions: {
enabled: true,
},
}),
],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
});