114 lines
2.7 KiB
JavaScript
114 lines
2.7 KiB
JavaScript
import vue from '@vitejs/plugin-vue'
|
|
import ui from '@nuxt/ui/vite'
|
|
import { defineConfig } from 'vite'
|
|
import { VitePWA } from 'vite-plugin-pwa'
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
plugins: [
|
|
vue(),
|
|
ui(),
|
|
VitePWA({
|
|
injectRegister: null,
|
|
registerType: 'prompt',
|
|
devOptions: {
|
|
enabled: true,
|
|
type: 'module',
|
|
},
|
|
workbox: {
|
|
globPatterns: ['**/*.{js,css,html,ico,png,svg}'],
|
|
},
|
|
includeAssets: [
|
|
'favicon.svg',
|
|
'favicon.ico',
|
|
'icon-192x192.png',
|
|
'icon-512x512.png',
|
|
'maskable_icon.png',
|
|
],
|
|
manifest: {
|
|
name: 'PGTune',
|
|
short_name: 'PGTune',
|
|
description: 'PgTune - Tuning PostgreSQL config by your hardware',
|
|
display: 'standalone',
|
|
start_url: '/',
|
|
theme_color: '#fff',
|
|
background_color: '#fff',
|
|
icons: [
|
|
{
|
|
src: '/icon-192x192.png',
|
|
sizes: '192x192',
|
|
type: 'image/png',
|
|
purpose: 'any',
|
|
},
|
|
{
|
|
src: '/icon-512x512.png',
|
|
sizes: '512x512',
|
|
type: 'image/png',
|
|
purpose: 'any',
|
|
},
|
|
{
|
|
src: '/maskable_icon.png',
|
|
sizes: '1024x1024',
|
|
type: 'image/png',
|
|
purpose: 'maskable',
|
|
},
|
|
],
|
|
},
|
|
}),
|
|
/*
|
|
VitePWA({
|
|
injectRegister: null,
|
|
strategies: 'injectManifest',
|
|
registerType: 'prompt',
|
|
srcDir: 'src',
|
|
// filename: 'sw.js',
|
|
base: '/',
|
|
scope: '/',
|
|
includeAssets: [
|
|
'favicon.svg',
|
|
'favicon.ico',
|
|
'icon-192x192.png',
|
|
'icon-512x512.png',
|
|
'maskable_icon.png',
|
|
'about.html',
|
|
],
|
|
injectManifest: {
|
|
globPatterns: ['\*\*\/*.{css,js,html,png,svg,ico}'],
|
|
},
|
|
devOptions: {
|
|
enabled: true,
|
|
type: 'module',
|
|
},
|
|
manifest: {
|
|
name: 'PGTune',
|
|
short_name: 'PGTune',
|
|
description: 'PgTune - Tuning PostgreSQL config by your hardware',
|
|
display: 'standalone',
|
|
start_url: '/',
|
|
theme_color: '#fdf6e3',
|
|
background_color: '#fdf6e3',
|
|
icons: [
|
|
{
|
|
src: '/icon-192x192.png',
|
|
sizes: '192x192',
|
|
type: 'image/png',
|
|
purpose: 'any',
|
|
},
|
|
{
|
|
src: '/icon-512x512.png',
|
|
sizes: '512x512',
|
|
type: 'image/png',
|
|
purpose: 'any',
|
|
},
|
|
{
|
|
src: '/maskable_icon.png',
|
|
sizes: '1024x1024',
|
|
type: 'image/png',
|
|
purpose: 'maskable',
|
|
},
|
|
],
|
|
},
|
|
}), */
|
|
],
|
|
})
|