feat: add PWA support with offline capabilities
- Add web app manifest with icons and theme configuration - Add service worker with cache-first strategy for static assets - Add useServiceWorker hook for SW registration - Add PWA meta tags and Apple-specific tags to index.html - Update vite.config.ts for optimal asset caching
This commit is contained in:
@@ -20,13 +20,14 @@ export default defineConfig({
|
||||
base: "./",
|
||||
build: {
|
||||
sourcemap: false,
|
||||
assetsInlineLimit: 0, // Ensure assets are not inlined for proper PWA caching
|
||||
},
|
||||
server: {
|
||||
https: useHTTPS
|
||||
? {
|
||||
cert: fs.readFileSync(sslCertPath),
|
||||
key: fs.readFileSync(sslKeyPath),
|
||||
}
|
||||
cert: fs.readFileSync(sslCertPath),
|
||||
key: fs.readFileSync(sslKeyPath),
|
||||
}
|
||||
: false,
|
||||
port: 5173,
|
||||
host: "localhost",
|
||||
|
||||
Reference in New Issue
Block a user