-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathastro.config.mjs
101 lines (94 loc) · 2.19 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
import { defineConfig } from "astro/config"
import { siteMeta } from "./src/site.config"
import { astroImageTools } from "astro-imagetools"
import AstroPWA from '@vite-pwa/astro'
// https://astro.build/config
import mdx from "@astrojs/mdx"
// https://astro.build/config
import prefetch from "@astrojs/prefetch"
// https://astro.build/config
import compress from "astro-compress"
// https://astro.build/config
import sitemap from "@astrojs/sitemap"
// https://astro.build/config
export default defineConfig({
site: siteMeta.url,
markdown: {
extendDefaultPlugins: true,
},
integrations: [
AstroPWA({
// mode: 'development',
// base: '/',
// scope: '/',
includeAssets: ['favicon.svg'],
registerType: 'autoUpdate',
manifest: {
globDirectory: "dist",
name: siteMeta.title,
short_name: siteMeta.title,
description: siteMeta.description,
start_url: '/',
display: "standalone",
display_override: [
"window-control-overlay",
],
theme_color: '#ffffff',
icons: [
{
src: 'icon-192.png',
sizes: '192x192',
type: 'image/png',
purpose: "any"
},
{
src: 'icon-192-maskable.png',
sizes: '192x192',
type: 'image/png',
purpose: "maskable"
},
{
src: 'icon-512.png',
sizes: '512x512',
type: 'image/png',
purpose: "any"
},
{
src: 'icon-512-maskable.png',
sizes: '512x512',
type: 'image/png',
purpose: "maskable"
}
],
},
workbox: {
globDirectory: "dist",
globPatterns: ['**/*.{css,js,html,svg,png,ico,txt,webp,woff2}'],
},
// devOptions: {
// enabled: true,
// navigateFallback: '/404',
// },
}),
astroImageTools,
mdx({
extendPlugins: "markdown",
}),
prefetch(),
compress({
css: false,
html: true,
img: false,
js: false,
svg: true,
logger: 2,
}),
sitemap(),
],
vite: {
// plugins: [],
css: {
devSourcemap: true,
},
},
})