-
Notifications
You must be signed in to change notification settings - Fork 0
/
astro.config.mjs
80 lines (77 loc) · 1.77 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
import { defineConfig } from 'astro/config'
import tailwind from '@astrojs/tailwind'
import react from '@astrojs/react'
import prefetch from '@astrojs/prefetch'
import { astroImageTools } from 'astro-imagetools'
import critters from 'astro-critters'
import sitemap from 'astro-sitemap'
import Compress from 'astro-compress'
import compressor from 'astro-compressor'
const website = 'https://estelibuses.web.app'
// https://astro.build/config
export default defineConfig({
site: website,
trailingSlash: 'never',
scopedStyleStrategy: 'where',
compressHTML: false,
server: {
host: true
},
integrations: [
tailwind({
applyBaseStyles: false
}),
react(),
prefetch(),
astroImageTools,
critters(),
sitemap({
canonicalURL: website,
filter(page) {
return !/(politica-de-privacidad)/g.test(page)
},
lastmod: new Date(),
createLinkInHead: false,
xmlns: {
xhtml: true
},
i18n: {
defaultLocale: 'es',
locales: {
es: 'es'
}
},
serialize(item) {
// eslint-disable-next-line no-param-reassign
item.url = item.url.replace(/\/$/g, '')
return item
}
}),
Compress({
HTML: {
collapseBooleanAttributes: true,
maxLineLength: 0,
removeAttributeQuotes: false,
removeComments: true,
removeEmptyAttributes: true,
removeOptionalTags: true,
removeRedundantAttributes: true,
useShortDoctype: true
},
JavaScript: {
compress: {
ecma: 2015
},
format: {
comments: false,
ecma: 2015
},
ecma: 2015,
module: true
},
Image: false,
SVG: false
}),
compressor()
]
})