This commit is contained in:
Aman Varshney
2025-04-14 21:45:28 +05:30
parent 8b03441909
commit 7f441ef670
268 changed files with 3513 additions and 3039 deletions

View File

@@ -0,0 +1,43 @@
{{! Import VitePWA only if 'pwa' addon is selected }}
{{#if (includes addons "pwa")}}
import { VitePWA } from "vite-plugin-pwa";
{{/if}}
import tailwindcss from "@tailwindcss/vite";
import { TanStackRouterVite } from "@tanstack/router-plugin/vite";
import react from "@vitejs/plugin-react";
import path from "node:path";
import { defineConfig } from "vite";
export default defineConfig({
plugins: [
tailwindcss(),
TanStackRouterVite({}),
react(),
{{! Add VitePWA plugin config only if 'pwa' addon is selected }}
{{#if (includes addons "pwa")}}
VitePWA({
registerType: "autoUpdate",
manifest: {
// Use context variables for better naming
name: "{{projectName}}",
short_name: "{{projectName}}",
description: "{{projectName}} - PWA Application",
theme_color: "#0c0c0c",
// Add more manifest options as needed
},
pwaAssets: {
disabled: false, // Set to false to enable asset generation
config: true, // Use pwa-assets.config.ts
},
devOptions: {
enabled: true, // Enable PWA features in dev mode
},
}),
{{/if}}
],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
});