mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
Add PWA setup with vite-plugin-pwa, assets generator, and templates Include CLI flag and interactive prompt option for PWA installation
36 lines
783 B
TypeScript
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"),
|
|
},
|
|
},
|
|
});
|