forked from midudev/la-velada-web-oficial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
astro.config.ts
73 lines (71 loc) · 1.57 KB
/
astro.config.ts
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
import db from "@astrojs/db"
import sitemap from "@astrojs/sitemap"
import tailwind from "@astrojs/tailwind"
import vercel from "@astrojs/vercel/serverless"
import { defineConfig } from "astro/config"
import auth from "auth-astro"
import { VitePWA } from "vite-plugin-pwa"
// Helper imports
import { manifest, seoConfig } from "./src/utils/seoConfig"
// https://astro.build/config
export default defineConfig({
build: {
inlineStylesheets: "always",
},
compressHTML: true,
prefetch: true,
devToolbar: {
enabled: false,
},
integrations: [tailwind(), sitemap(), auth(), db()],
adapter: vercel({
webAnalytics: {
enabled: true,
},
}),
output: "server",
site: seoConfig.baseURL,
vite: {
build: {
cssMinify: "lightningcss",
},
ssr: {
noExternal: ["path-to-regexp"],
},
plugins: [
VitePWA({
registerType: "autoUpdate",
manifest,
workbox: {
globDirectory: ".vercel/output/static",
globPatterns: ["**/*.{html,js,css,woff,woff2,ttf,eot,ico}"],
runtimeCaching: [
{
urlPattern: /\.(?:png|jpg|jpeg|svg|gif|webp|avif)$/,
handler: "CacheFirst",
options: {
cacheName: "images",
expiration: {
maxEntries: 100,
maxAgeSeconds: 30 * 24 * 60 * 60,
},
},
},
{
urlPattern: /\.(?:woff|woff2|ttf|eot|ico)$/,
handler: "CacheFirst",
options: {
cacheName: "fonts",
expiration: {
maxEntries: 10,
maxAgeSeconds: 30 * 24 * 60 * 60,
},
},
},
],
navigateFallback: null,
},
}),
],
},
})