Virtual whiteboard for sketching hand-drawn like diagrams
build: add a flag VITE_APP_ENABLE_PWA for enabling pwa in dev environment (#8784)
Aakansha Doshiee091d0dbd08
diff --git a/.env.development b/.env.developmentindex badc209a2a..c2e84da607 100644--- a/.env.development+++ b/.env.development@@ -38,6 +38,9 @@ VITE_APP_COLLAPSE_OVERLAY=true# Set this flag to false to disable eslintVITE_APP_ENABLE_ESLINT=true+# Enable PWA in dev server+VITE_APP_ENABLE_PWA=true+VITE_APP_PLUS_EXPORT_PUBLIC_KEY='MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAm2g5T+Rub6Kbf1Mf57t07r2zeHuVg4dla3r5ryXMswtzz6x767octl6oLThn33mQsPSy3GKglFZoCTXJR4ijba8SxB04sL/N8eRrKja7TFWjCVtRwTTfyy771NYYNFVJclkxHyE5qw4m27crHF1ydiff --git a/excalidraw-app/vite-env.d.ts b/excalidraw-app/vite-env.d.tsindex 3230946fba..ade60e859e 100644--- a/excalidraw-app/vite-env.d.ts+++ b/excalidraw-app/vite-env.d.ts@@ -29,6 +29,9 @@ interface ImportMetaEnv {// Enable eslint in dev serverVITE_APP_ENABLE_ESLINT: string;+ // Enable PWA in dev server+ VITE_APP_ENABLE_PWA: string;+VITE_APP_PLUS_LP: string;VITE_APP_PLUS_APP: string;diff --git a/excalidraw-app/vite.config.mts b/excalidraw-app/vite.config.mtsindex 0345c8ee7c..2d18f8c06d 100644--- a/excalidraw-app/vite.config.mts+++ b/excalidraw-app/vite.config.mts@@ -80,7 +80,7 @@ export default defineConfig(({ mode }) => {registerType: "autoUpdate",devOptions: {/* set this flag to true to enable in Development mode */- enabled: false,+ enabled: envVars.VITE_APP_ENABLE_PWA === "true",},workbox: {@@ -169,6 +169,7 @@ export default defineConfig(({ mode }) => {},],start_url: "/",+ id:"excalidraw",display: "standalone",theme_color: "#121212",background_color: "#ffffff",