feat: implement Progressive Web App (PWA) functionality with new assets and configuration.

This commit is contained in:
2025-12-23 11:52:40 +01:00
parent 8c010e06e5
commit 7977ccf612
9 changed files with 642 additions and 1 deletions

View File

@@ -2,6 +2,7 @@ import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import tailwindcss from '@tailwindcss/vite'
import path from 'path'
import { VitePWA } from 'vite-plugin-pwa'
// https://vite.dev/config/
export default defineConfig({
@@ -12,6 +13,37 @@ export default defineConfig({
},
}),
tailwindcss(),
VitePWA({
registerType: 'autoUpdate',
includeAssets: ['favicon.ico', 'apple-touch-icon.png', 'masked-icon.svg'],
manifest: {
name: 'K-Notes',
short_name: 'K-Notes',
description: 'A modern, glossy note-taking app',
theme_color: '#ffffff',
icons: [
{
src: 'pwa-192x192.png',
sizes: '192x192',
type: 'image/png'
},
{
src: 'pwa-512x512.png',
sizes: '512x512',
type: 'image/png'
},
{
src: 'pwa-512x512.png',
sizes: '512x512',
type: 'image/png',
purpose: 'any maskable'
}
]
},
devOptions: {
enabled: true
}
})
],
resolve: {
alias: {