Files
indee-demo/vite.config.ts
Dorian 93403375d3 Fix TypeScript build errors for Docker deployment
- Add ImportMeta and ImportMetaEnv type declarations to env.d.ts
- Fix typo: INDEEHHUB_API → INDEEDHUB_API in indeeHubApi.ts
- Fix nostr-tools Filter type usage in subscribeToContent
- Remove unused Filter import and userPrivkey parameter
- Increase Workbox maximumFileSizeToCacheInBytes to 10MB for large images
- Build now succeeds with 43 precached entries (81.98 MB)

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-02 23:47:45 +00:00

58 lines
1.6 KiB
TypeScript

import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { VitePWA } from 'vite-plugin-pwa'
export default defineConfig({
plugins: [
vue(),
VitePWA({
registerType: 'autoUpdate',
includeAssets: ['assets/images/app-icon.svg', 'assets/fonts/*.otf'],
manifest: {
name: 'IndeedHub - Decentralized Media Streaming',
short_name: 'IndeedHub',
description: 'Stream films and content on the decentralized web powered by Nostr and Bitcoin',
theme_color: '#0a0a0a',
background_color: '#0a0a0a',
display: 'standalone',
orientation: 'portrait-primary',
icons: [
{
src: '/assets/images/app-icon.svg',
sizes: '512x512',
type: 'image/svg+xml',
purpose: 'any maskable'
}
]
},
workbox: {
maximumFileSizeToCacheInBytes: 10 * 1024 * 1024, // 10 MB limit
globPatterns: ['**/*.{js,css,html,ico,png,svg,jpg,jpeg,woff,woff2,otf}'],
runtimeCaching: [
{
urlPattern: /^https:\/\/images\.unsplash\.com\/.*/i,
handler: 'CacheFirst',
options: {
cacheName: 'unsplash-images-cache',
expiration: {
maxEntries: 50,
maxAgeSeconds: 60 * 60 * 24 * 30 // 30 days
}
}
}
]
}
})
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
},
server: {
port: 3000,
host: true
}
})