mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-07-03 09:36:21 +02:00
Update develop.md sw docs
turns out http://localhost runs service workers just fine on all desktop browsers 🤷
This commit is contained in:
parent
83eb4c39e5
commit
fa418eef16
2 changed files with 2 additions and 39 deletions
|
@ -3,13 +3,6 @@ import { defineConfig } from "vite";
|
|||
import react from "@vitejs/plugin-react";
|
||||
import { VitePWA } from "vite-plugin-pwa";
|
||||
|
||||
// please look at develop.md for how to run your browser
|
||||
// in a mode allowing insecure service worker testing
|
||||
// this turns on:
|
||||
// - the service worker in dev mode
|
||||
// - turns off automatically opening the browser
|
||||
const enableLocalPWATesting = process.env.ENABLE_DEV_PWA;
|
||||
|
||||
export default defineConfig(() => ({
|
||||
build: {
|
||||
outDir: "build",
|
||||
|
@ -18,7 +11,6 @@ export default defineConfig(() => ({
|
|||
},
|
||||
server: {
|
||||
port: 3000,
|
||||
open: !enableLocalPWATesting,
|
||||
},
|
||||
plugins: [
|
||||
react(),
|
||||
|
@ -27,7 +19,7 @@ export default defineConfig(() => ({
|
|||
injectRegister: "inline",
|
||||
strategies: "injectManifest",
|
||||
devOptions: {
|
||||
enabled: enableLocalPWATesting,
|
||||
enabled: true,
|
||||
/* when using generateSW the PWA plugin will switch to classic */
|
||||
type: "module",
|
||||
navigateFallback: "index.html",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue