48 lines
1.0 KiB
JavaScript
48 lines
1.0 KiB
JavaScript
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import { VitePWA } from 'vite-plugin-pwa'
|
|
import path from 'path'
|
|
|
|
export default defineConfig({
|
|
define: {
|
|
'__APP_VERSION__': JSON.stringify(process.env.npm_package_version)
|
|
},
|
|
plugins: [
|
|
vue(),
|
|
VitePWA({
|
|
registerType: 'autoUpdate',
|
|
injectRegister: 'auto',
|
|
devOptions: {
|
|
enabled: true
|
|
},
|
|
manifest: {
|
|
name: 'Nonograms',
|
|
short_name: 'Nonograms',
|
|
description: 'Nonograms',
|
|
start_url: '/',
|
|
scope: '/',
|
|
display: 'standalone',
|
|
background_color: '#191654',
|
|
theme_color: '#00f2fe',
|
|
icons: [
|
|
{
|
|
src: '/pwa-192x192.svg',
|
|
sizes: '192x192',
|
|
type: 'image/svg+xml'
|
|
},
|
|
{
|
|
src: '/pwa-512x512.svg',
|
|
sizes: '512x512',
|
|
type: 'image/svg+xml'
|
|
}
|
|
]
|
|
}
|
|
})
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, './src')
|
|
}
|
|
}
|
|
})
|