RyuMusic

RyuMusic client vite.config.ts

1.5 KB 64 lines Raw ↗ GitHub ↗

import adapter from '@sveltejs/adapter-static';import { sveltekit } from '@sveltejs/kit/vite';import { SvelteKitPWA } from '@vite-pwa/sveltekit';import { defineConfig } from 'vite';export default defineConfig({	plugins: [		sveltekit({			compilerOptions: {				runes: ({ filename }: { filename: string }) =>					filename.split(/[/\\]/).includes('node_modules') ? undefined : true			},			adapter: adapter({				fallback: 'index.html',				precompress: false,				strict: false			})		}),		SvelteKitPWA({			strategies: 'injectManifest',			registerType: 'prompt',			injectRegister: false,			devOptions: {				enabled: false			},			manifest: {				name: 'RyuMusic',				short_name: 'RyuMusic',				description: 'A YouTube Music web client.',				lang: 'en',				start_url: '/',				scope: '/',				display: 'standalone',				orientation: 'portrait',				background_color: '#0a0a0c',				theme_color: '#0a0a0c',				categories: ['music', 'entertainment'],				icons: [					{ src: '/icons/icon-192.png', sizes: '192x192', type: 'image/png' },					{ src: '/icons/icon-512.png', sizes: '512x512', type: 'image/png' },					{						src: '/icons/maskable-512.png',						sizes: '512x512',						type: 'image/png',						purpose: 'maskable'					}				]			},			injectManifest: {				globPatterns: ['**/*.{js,css,html,svg,png,woff2}'],				maximumFileSizeToCacheInBytes: 6 * 1024 * 1024			}		})	],	server: {		proxy: {			'/api': {				target: 'http://localhost:8000',				changeOrigin: true			}		}	}});