-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
astro.config.mjs
49 lines (48 loc) · 1.44 KB
/
astro.config.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import react from '@astrojs/react';
import tailwind from '@astrojs/tailwind';
import { defineConfig } from 'astro/config';
import sitemap from '@astrojs/sitemap';
import compress from 'astro-compress';
import robotsTxt from 'astro-robots-txt';
import AstroPWA from '@vite-pwa/astro';
import { BasePath, PUBLIC_URL } from './src/utils/url';
// https://astro.build/config
export default defineConfig({
site: PUBLIC_URL.toString(),
base: `${PUBLIC_URL.pathname}/`,
output: 'static',
build: {
format: 'file'
},
integrations: [
react(),
tailwind(),
sitemap(),
compress(),
robotsTxt(),
AstroPWA({
registerType: 'autoUpdate',
manifest: {
name: 'Risk Dice Roller',
short_name: 'Risk Roller',
description:
'A simple dice roller for the board game Risk. Roll the dice and see the results of your attack or defense.',
theme_color: '#eab308',
background_color: '#ef4444',
display: 'fullscreen'
},
includeAssets: ['favicon.svg'],
workbox: {
globDirectory: 'dist',
globPatterns: ['**/*.{js,css,svg,png,jpg,jpeg,gif,webp,woff,woff2,ttf,eot,ico}'],
// Don't fallback on document based (e.g. `/some-page`) requests
// This removes an errant console.log message from showing up.
navigateFallback: null
},
pwaAssets: {
preset: 'minimal-2023',
images: './public/favicon.svg'
}
})
]
});