build: add a flag VITE_APP_ENABLE_PWA for enabling pwa in dev environment (#8784)
* build: add a flag VITE_APP_ENABLE_PWA for enabling pwa in dev environment * fix * set VITE_ENABLE_PWA to false in .env.development
This commit is contained in:
parent
ef9ea14a75
commit
ee091d0dbd
@ -38,6 +38,9 @@ VITE_APP_COLLAPSE_OVERLAY=true
|
|||||||
# Set this flag to false to disable eslint
|
# Set this flag to false to disable eslint
|
||||||
VITE_APP_ENABLE_ESLINT=true
|
VITE_APP_ENABLE_ESLINT=true
|
||||||
|
|
||||||
|
# Enable PWA in dev server
|
||||||
|
VITE_APP_ENABLE_PWA=true
|
||||||
|
|
||||||
VITE_APP_PLUS_EXPORT_PUBLIC_KEY='MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAm2g5T+Rub6Kbf1Mf57t0
|
VITE_APP_PLUS_EXPORT_PUBLIC_KEY='MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAm2g5T+Rub6Kbf1Mf57t0
|
||||||
7r2zeHuVg4dla3r5ryXMswtzz6x767octl6oLThn33mQsPSy3GKglFZoCTXJR4ij
|
7r2zeHuVg4dla3r5ryXMswtzz6x767octl6oLThn33mQsPSy3GKglFZoCTXJR4ij
|
||||||
ba8SxB04sL/N8eRrKja7TFWjCVtRwTTfyy771NYYNFVJclkxHyE5qw4m27crHF1y
|
ba8SxB04sL/N8eRrKja7TFWjCVtRwTTfyy771NYYNFVJclkxHyE5qw4m27crHF1y
|
||||||
|
3
excalidraw-app/vite-env.d.ts
vendored
3
excalidraw-app/vite-env.d.ts
vendored
@ -29,6 +29,9 @@ interface ImportMetaEnv {
|
|||||||
// Enable eslint in dev server
|
// Enable eslint in dev server
|
||||||
VITE_APP_ENABLE_ESLINT: string;
|
VITE_APP_ENABLE_ESLINT: string;
|
||||||
|
|
||||||
|
// Enable PWA in dev server
|
||||||
|
VITE_APP_ENABLE_PWA: string;
|
||||||
|
|
||||||
VITE_APP_PLUS_LP: string;
|
VITE_APP_PLUS_LP: string;
|
||||||
|
|
||||||
VITE_APP_PLUS_APP: string;
|
VITE_APP_PLUS_APP: string;
|
||||||
|
@ -80,7 +80,7 @@ export default defineConfig(({ mode }) => {
|
|||||||
registerType: "autoUpdate",
|
registerType: "autoUpdate",
|
||||||
devOptions: {
|
devOptions: {
|
||||||
/* set this flag to true to enable in Development mode */
|
/* set this flag to true to enable in Development mode */
|
||||||
enabled: false,
|
enabled: envVars.VITE_APP_ENABLE_PWA === "true",
|
||||||
},
|
},
|
||||||
|
|
||||||
workbox: {
|
workbox: {
|
||||||
@ -169,6 +169,7 @@ export default defineConfig(({ mode }) => {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
start_url: "/",
|
start_url: "/",
|
||||||
|
id:"excalidraw",
|
||||||
display: "standalone",
|
display: "standalone",
|
||||||
theme_color: "#121212",
|
theme_color: "#121212",
|
||||||
background_color: "#ffffff",
|
background_color: "#ffffff",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user