Reverted service worker; got caching working

This commit is contained in:
Sean Edmunds
2025-04-14 13:36:14 -05:00
parent baefeba3c8
commit abb0e10b84
4 changed files with 2 additions and 30 deletions

View File

@@ -1,7 +1,6 @@
import path from 'node:path';
import react from '@vitejs/plugin-react';
import { defineConfig, loadEnv } from 'vite';
import { VitePWA } from 'vite-plugin-pwa';
// https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
@@ -26,23 +25,7 @@ export default defineConfig(({ mode }) => {
},
},
},
plugins: [
react(),
VitePWA({
srcDir: "src",
filename: "service-worker.ts",
strategies: "injectManifest",
injectRegister: false,
manifest: false,
injectManifest: {
injectionPoint: undefined,
},
workbox: {
maximumFileSizeToCacheInBytes: 10 * 1024 * 1024,
globPatterns: ['**/*.{ts,js,css,html,ico,png,svg}']
}
})
],
plugins: [react()],
server: {
port: 3000,
host: '0.0.0.0',