Update vite.config.js

This commit is contained in:
2025-08-28 08:53:35 -07:00
committed by GitHub
parent 81e6c54e65
commit 222d7351dd

View File

@@ -2,38 +2,39 @@ import { defineConfig } from 'vite'
import { VitePWA } from 'vite-plugin-pwa' import { VitePWA } from 'vite-plugin-pwa'
import { createHtmlPlugin } from 'vite-plugin-html' import { createHtmlPlugin } from 'vite-plugin-html'
const pwa = VitePWA({ export default defineConfig({
registerType: 'autoUpdate', build:{ minify:false },
manifest: { plugins:[
id: 'https://sune.planetrenox.com/', VitePWA({
name: 'Sune', registerType:'autoUpdate',
short_name: 'Sune', manifest:{
description: 'OpenRouter GUI Frontend', id:'https://sune.planetrenox.com/',
start_url: 'https://sune.planetrenox.com/', name:'Sune',
display: 'standalone', short_name:'Sune',
orientation: 'portrait', description:'OpenRouter GUI Frontend',
theme_color: '#FFFFFF', start_url:'https://sune.planetrenox.com/',
background_color: '#000000', display:'standalone',
categories: ['productivity','utilities'], orientation:'portrait',
icons: [{ src: 'https://sune.planetrenox.com/appstore_content/✺.png', sizes: '1024x1024', type: 'image/png' }], theme_color:'#FFFFFF',
screenshots: [ background_color:'#000000',
{ src: 'https://sune.planetrenox.com/appstore_content/screenshot1.jpg', sizes: '1344x2693', type: 'image/jpeg' }, categories:['productivity','utilities'],
{ src: 'https://sune.planetrenox.com/appstore_content/screenshot2.jpg', sizes: '1344x2699', type: 'image/jpeg' } icons:[{ src:'https://sune.planetrenox.com/appstore_content/✺.png', sizes:'1024x1024', type:'image/png' }],
] screenshots:[{ src:'https://sune.planetrenox.com/appstore_content/screenshot1.jpg', sizes:'1344x2693', type:'image/jpeg' },{ src:'https://sune.planetrenox.com/appstore_content/screenshot2.jpg', sizes:'1344x2699', type:'image/jpeg' }]
} }
}),
createHtmlPlugin({
minify:false,
inject:{
tags:[
{ tag:'meta', attrs:{ charset:'utf-8' }, injectTo:'head' },
{ tag:'title', children:'Sune', injectTo:'head' },
{ tag:'link', attrs:{ rel:'icon', type:'image/avif', href:'https://sune.planetrenox.com/✺.avif' }, injectTo:'head' },
{ tag:'script', attrs:{ src:'https://cdn.jsdelivr.net/npm/tiny-ripple@0.2.0' }, injectTo:'head' },
{ tag:'style', children:':root{--safe-bottom:env(safe-area-inset-bottom)}::-webkit-scrollbar{height:8px;width:8px}::-webkit-scrollbar-thumb{background:#e5e7eb;border-radius:999px}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}', injectTo:'head' },
{ tag:'style', children:'html,body{overscroll-behavior-y:contain}', injectTo:'head' },
{ tag:'style', children:'#htmlEditor{outline:none;white-space:pre!important}', injectTo:'head' }
]
}
})
]
}) })
const html = createHtmlPlugin({
minify: false,
inject: {
tags: [
{ tag: 'meta', attrs: { charset: 'utf-8' }, injectTo: 'head' },
{ tag: 'title', children: 'Sune', injectTo: 'head' },
{ tag: 'link', attrs: { rel: 'icon', type: 'image/avif', href: 'https://sune.planetrenox.com/✺.avif' }, injectTo: 'head' },
{ tag: 'script', attrs: { src: 'https://cdn.jsdelivr.net/npm/tiny-ripple@0.2.0' }, injectTo: 'head' },
{ tag: 'style', children: ':root{--safe-bottom:env(safe-area-inset-bottom)}::-webkit-scrollbar{height:8px;width:8px}::-webkit-scrollbar-thumb{background:#e5e7eb;border-radius:999px}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}html,body{overscroll-behavior-y:contain}#htmlEditor{outline:none;white-space:pre!important}', injectTo: 'head' }
]
}
})
export default defineConfig({ build: { minify: false }, plugins: [pwa, html] })