mirror of
https://github.com/multipleof4/sune.git
synced 2026-01-13 16:17:55 +00:00
Update vite.config.js
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import { defineConfig } from 'vite'
|
import { defineConfig } from 'vite'
|
||||||
import { VitePWA } from 'vite-plugin-pwa'
|
import { VitePWA } from 'vite-plugin-pwa'
|
||||||
import htmlPlugin from 'vite-plugin-html-config'
|
import { createHtmlPlugin } from 'vite-plugin-html'
|
||||||
|
|
||||||
const pwa = VitePWA({
|
const pwa = VitePWA({
|
||||||
registerType: 'autoUpdate',
|
registerType: 'autoUpdate',
|
||||||
@@ -14,7 +14,7 @@ const pwa = VitePWA({
|
|||||||
orientation: 'portrait',
|
orientation: 'portrait',
|
||||||
theme_color: '#FFFFFF',
|
theme_color: '#FFFFFF',
|
||||||
background_color: '#000000',
|
background_color: '#000000',
|
||||||
categories: ['productivity', 'utilities'],
|
categories: ['productivity','utilities'],
|
||||||
icons: [{ src: 'https://sune.planetrenox.com/appstore_content/✺.png', sizes: '1024x1024', type: 'image/png' }],
|
icons: [{ src: 'https://sune.planetrenox.com/appstore_content/✺.png', sizes: '1024x1024', type: 'image/png' }],
|
||||||
screenshots: [
|
screenshots: [
|
||||||
{ src: 'https://sune.planetrenox.com/appstore_content/screenshot1.jpg', sizes: '1344x2693', type: 'image/jpeg' },
|
{ src: 'https://sune.planetrenox.com/appstore_content/screenshot1.jpg', sizes: '1344x2693', type: 'image/jpeg' },
|
||||||
@@ -23,14 +23,15 @@ const pwa = VitePWA({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const html = htmlPlugin({
|
const html = createHtmlPlugin({
|
||||||
title: 'Sune',
|
inject: {
|
||||||
metas: [{ name: 'viewport', content: 'width=device-width, initial-scale=1, viewport-fit=cover' }],
|
tags: [
|
||||||
links: [{ rel: 'icon', type: 'image/avif', href: 'https://sune.planetrenox.com/✺.avif' }],
|
{ tag: 'title', children: 'Sune', injectTo: 'head' },
|
||||||
headScripts: [{ src: 'https://cdn.jsdelivr.net/npm/tiny-ripple@0.2.0' }]
|
{ 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' }
|
||||||
|
]
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({ build: { outDir: 'docs' }, plugins: [pwa, html] })
|
||||||
build: { outDir: 'docs' },
|
|
||||||
plugins: [html, pwa]
|
|
||||||
})
|
|
||||||
|
|||||||
Reference in New Issue
Block a user