69 lines
1.6 KiB
TypeScript
69 lines
1.6 KiB
TypeScript
import path from 'node:path'
|
|
import { defineConfig } from 'vite'
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import { VitePWA } from 'vite-plugin-pwa'
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
vue(),
|
|
tailwindcss(),
|
|
VitePWA({
|
|
registerType: 'autoUpdate',
|
|
includeAssets: ['favicon.svg'],
|
|
manifest: {
|
|
id: '/',
|
|
name: 'SyncPad',
|
|
short_name: 'SyncPad',
|
|
description: 'Private, end-to-end encrypted note-taking app',
|
|
theme_color: '#0a0a0a',
|
|
background_color: '#0a0a0a',
|
|
display: 'standalone',
|
|
orientation: 'any',
|
|
start_url: '/',
|
|
scope: '/',
|
|
icons: [
|
|
{
|
|
src: 'pwa-192x192.png',
|
|
sizes: '192x192',
|
|
type: 'image/png',
|
|
},
|
|
{
|
|
src: 'pwa-512x512.png',
|
|
sizes: '512x512',
|
|
type: 'image/png',
|
|
},
|
|
{
|
|
src: 'pwa-192x192-maskable.png',
|
|
sizes: '192x192',
|
|
type: 'image/png',
|
|
purpose: 'maskable',
|
|
},
|
|
{
|
|
src: 'pwa-512x512-maskable.png',
|
|
sizes: '512x512',
|
|
type: 'image/png',
|
|
purpose: 'maskable',
|
|
},
|
|
],
|
|
},
|
|
workbox: {
|
|
globPatterns: ['**/*.{js,css,html,svg,png,woff,woff2}'],
|
|
},
|
|
devOptions: {
|
|
enabled: true,
|
|
suppressWarnings: true,
|
|
},
|
|
}),
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, './src'),
|
|
},
|
|
},
|
|
server: {
|
|
host: true,
|
|
allowedHosts: ['syncpad.harvmaster.com', 'localhost'],
|
|
},
|
|
})
|