2023-06-01 15:25:21 +02:00
|
|
|
import { defineConfig } from 'vite'
|
2026-02-10 23:45:58 +01:00
|
|
|
import { resolve, dirname } from 'path'
|
|
|
|
|
import { fileURLToPath } from 'url'
|
2023-06-01 15:25:21 +02:00
|
|
|
import vue from '@vitejs/plugin-vue'
|
|
|
|
|
import { VitePWA } from 'vite-plugin-pwa'
|
2026-02-10 23:45:58 +01:00
|
|
|
import websocketPlugin from './vite-plugin-websocket.js'
|
|
|
|
|
|
|
|
|
|
const __dirname = dirname(fileURLToPath(import.meta.url))
|
2023-06-01 15:25:21 +02:00
|
|
|
|
2026-02-10 09:54:38 +01:00
|
|
|
// Configurazione principale di Vite
|
2023-06-01 15:25:21 +02:00
|
|
|
export default defineConfig({
|
2026-02-10 00:42:48 +01:00
|
|
|
base: '/',
|
2026-02-10 23:45:58 +01:00
|
|
|
build: {
|
|
|
|
|
rollupOptions: {
|
|
|
|
|
input: {
|
|
|
|
|
main: resolve(__dirname, 'index.html'),
|
|
|
|
|
controller: resolve(__dirname, 'controller.html'),
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
2023-06-01 15:25:21 +02:00
|
|
|
plugins: [
|
|
|
|
|
vue(),
|
2026-02-10 23:45:58 +01:00
|
|
|
websocketPlugin(),
|
2023-06-01 15:25:21 +02:00
|
|
|
VitePWA({
|
2023-06-06 16:03:26 +02:00
|
|
|
registerType: 'autoUpdate',
|
|
|
|
|
manifest: {
|
|
|
|
|
name: "app_segnap",
|
|
|
|
|
short_name: "segnap",
|
|
|
|
|
description: "Segnapunti standalone.",
|
|
|
|
|
background_color: "#eee",
|
|
|
|
|
theme_color: '#ffffff',
|
2023-06-07 14:46:09 +02:00
|
|
|
display: "fullscreen",
|
2023-06-06 16:03:26 +02:00
|
|
|
orientation: "landscape",
|
|
|
|
|
icons: [
|
|
|
|
|
{
|
|
|
|
|
src: 'segnap-192x192.png',
|
|
|
|
|
sizes: '192x192',
|
|
|
|
|
type: 'image/png'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
src: 'segnap-512x512.png',
|
|
|
|
|
sizes: '512x512',
|
|
|
|
|
type: 'image/png'
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
2023-06-01 15:25:21 +02:00
|
|
|
})
|
|
|
|
|
],
|
2026-02-10 09:54:38 +01:00
|
|
|
server: {
|
|
|
|
|
host: '0.0.0.0',
|
|
|
|
|
port: 5173,
|
|
|
|
|
},
|
2023-06-01 15:25:21 +02:00
|
|
|
})
|