feat: PWA and SSR
This commit is contained in:
+36
-5
@@ -6,11 +6,12 @@ export default defineNuxtConfig({
|
||||
'@nuxt/image',
|
||||
'@nuxt/fonts',
|
||||
'@nuxtjs/sitemap',
|
||||
'@nuxtjs/robots'
|
||||
'@nuxtjs/robots',
|
||||
'@vite-pwa/nuxt'
|
||||
],
|
||||
// TODO: riattivare prima di pubblicare il sito
|
||||
ssr: false,
|
||||
|
||||
|
||||
ssr: true,
|
||||
|
||||
runtimeConfig: {
|
||||
public: {
|
||||
url: 'http://localhost:3000',
|
||||
@@ -22,7 +23,7 @@ export default defineNuxtConfig({
|
||||
url: 'https://visione.studentindipendenti.it',
|
||||
name: 'Visione - Un\'occhio per la sicurezza del cittadino.',
|
||||
},
|
||||
|
||||
|
||||
css: [
|
||||
'leaflet/dist/leaflet.css',
|
||||
'bootstrap-italia/dist/css/bootstrap-italia.min.css',
|
||||
@@ -43,5 +44,35 @@ export default defineNuxtConfig({
|
||||
{ rel: 'icon', type: 'image/svg+xml', href: '/icon.svg' }
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
pwa: {
|
||||
registerType: 'autoUpdate',
|
||||
manifest: {
|
||||
name: 'Visione - Un\'occhio per la sicurezza',
|
||||
short_name: 'Visione',
|
||||
theme_color: '#003366',
|
||||
background_color: '#003366',
|
||||
display: 'standalone',
|
||||
orientation: 'portrait',
|
||||
icons: [
|
||||
{
|
||||
src: '/icon-192.webp',
|
||||
sizes: '192x192',
|
||||
type: 'image/webp',
|
||||
purpose: 'any'
|
||||
},
|
||||
{
|
||||
src: '/icon-512.webp',
|
||||
sizes: '512x512',
|
||||
type: 'image/webp',
|
||||
purpose: 'any'
|
||||
}
|
||||
]
|
||||
},
|
||||
workbox: {
|
||||
globPatterns: ['**/*.{js,css,html,png,svg,ico,webp}']
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
"@nuxt/image": "^2.0.0",
|
||||
"@nuxtjs/robots": "6.0.9",
|
||||
"@nuxtjs/sitemap": "8.0.15",
|
||||
"@vite-pwa/nuxt": "1.1.1",
|
||||
"bootstrap-italia": "^2.18.1",
|
||||
"codice-fiscale-js": "^2.3.23",
|
||||
"leaflet": "^1.9.4",
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 7.0 KiB |
Reference in New Issue
Block a user