From 2a41bf528caf98a435e6597d47a6efb66df2a531 Mon Sep 17 00:00:00 2001 From: hamid zarghami Date: Sun, 27 Jul 2025 12:14:43 +0330 Subject: [PATCH] check service worker --- vite.config.ts | 90 +++++++++++++++++++++++++------------------------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/vite.config.ts b/vite.config.ts index 8e645be..f70ef0b 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -2,7 +2,7 @@ import { defineConfig } from "vite"; import react from "@vitejs/plugin-react"; import tailwindcss from "@tailwindcss/vite"; import tsconfigPaths from "vite-tsconfig-paths"; -import { VitePWA } from "vite-plugin-pwa"; +// import { VitePWA } from "vite-plugin-pwa"; // https://vite.dev/config/ export default defineConfig({ @@ -10,49 +10,49 @@ export default defineConfig({ react(), tailwindcss(), tsconfigPaths(), - VitePWA({ - registerType: "autoUpdate", - devOptions: { - enabled: false, // در حالت توسعه هم کار کند - }, - manifest: { - name: "Danak Mail", - short_name: "Danak Mail", - description: "Danak Mail", - theme_color: "#ffffff", - background_color: "#ffffff", - display: "standalone", - start_url: "/received", // صفحه اصلی PWA - icons: [ - { - src: "/icon-192x192.png", - sizes: "192x192", - type: "image/png", - }, - { - src: "/icon-512x512.png", - sizes: "512x512", - type: "image/png", - }, - ], - }, - // workbox: { - // maximumFileSizeToCacheInBytes: 4 * 1024 * 1024, // افزایش به 4MB - // runtimeCaching: [ - // { - // urlPattern: /^https:\/\/admin-panel\.danakcorp\.com\//, - // handler: "NetworkFirst", - // options: { - // cacheName: "api-cache", - // expiration: { - // maxEntries: 50, - // maxAgeSeconds: 60 * 60 * 24, - // }, - // networkTimeoutSeconds: 10, - // }, - // }, - // ], - // }, - }), + // VitePWA({ + // registerType: "autoUpdate", + // devOptions: { + // enabled: false, // در حالت توسعه هم کار کند + // }, + // manifest: { + // name: "Danak Mail", + // short_name: "Danak Mail", + // description: "Danak Mail", + // theme_color: "#ffffff", + // background_color: "#ffffff", + // display: "standalone", + // start_url: "/received", // صفحه اصلی PWA + // icons: [ + // { + // src: "/icon-192x192.png", + // sizes: "192x192", + // type: "image/png", + // }, + // { + // src: "/icon-512x512.png", + // sizes: "512x512", + // type: "image/png", + // }, + // ], + // }, + // // workbox: { + // // maximumFileSizeToCacheInBytes: 4 * 1024 * 1024, // افزایش به 4MB + // // runtimeCaching: [ + // // { + // // urlPattern: /^https:\/\/admin-panel\.danakcorp\.com\//, + // // handler: "NetworkFirst", + // // options: { + // // cacheName: "api-cache", + // // expiration: { + // // maxEntries: 50, + // // maxAgeSeconds: 60 * 60 * 24, + // // }, + // // networkTimeoutSeconds: 10, + // // }, + // // }, + // // ], + // // }, + // }), ], });