pwa
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
// @ts-check
|
||||
import AstroPWA from '@vite-pwa/astro'
|
||||
import { defineConfig } from 'astro/config';
|
||||
|
||||
import tailwindcss from '@tailwindcss/vite';
|
||||
@@ -7,6 +8,49 @@ import node from '@astrojs/node';
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
integrations: [
|
||||
AstroPWA({
|
||||
mode: 'production',
|
||||
base: '/',
|
||||
scope: '/',
|
||||
includeAssets: ['favicon.ico'],
|
||||
registerType: 'autoUpdate',
|
||||
manifest: {
|
||||
name: 'Pole Book',
|
||||
short_name: 'Pole Book',
|
||||
theme_color: '#ffffff',
|
||||
icons: [
|
||||
{
|
||||
src: 'pwa-192x192.png',
|
||||
sizes: '192x192',
|
||||
type: 'image/png',
|
||||
},
|
||||
{
|
||||
src: 'pwa-512x512.png',
|
||||
sizes: '512x512',
|
||||
type: 'image/png',
|
||||
},
|
||||
{
|
||||
src: 'pwa-512x512.png',
|
||||
sizes: '512x512',
|
||||
type: 'image/png',
|
||||
purpose: 'any maskable',
|
||||
},
|
||||
],
|
||||
},
|
||||
workbox: {
|
||||
navigateFallback: '/',
|
||||
globPatterns: ['**/*.{css,js,html,svg,png,ico,txt}'],
|
||||
},
|
||||
devOptions: {
|
||||
enabled: false,
|
||||
navigateFallbackAllowlist: [/^\/$/],
|
||||
},
|
||||
experimental: {
|
||||
directoryAndTrailingSlashHandler: true,
|
||||
},
|
||||
}),
|
||||
],
|
||||
output: 'server',
|
||||
vite: {
|
||||
plugins: [tailwindcss()]
|
||||
|
||||
Reference in New Issue
Block a user