-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathastro.config.mjs
44 lines (42 loc) · 1.29 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
import { defineConfig } from 'astro/config'
import tailwind from '@astrojs/tailwind'
import react from '@astrojs/react'
import vercel from '@astrojs/vercel'
import db from '@astrojs/db'
import legacy from '@vitejs/plugin-legacy'
import sitemap from '@astrojs/sitemap'
import { VitePWA } from 'vite-plugin-pwa'
import { manifest } from './src/utils/manifest'
const SITE_URL =
import.meta.env.SITE_URL ||
import.meta.env.BETTER_AUTH_URL ||
'https://wovie.vercel.app'
// https://astro.build/config
export default defineConfig({
output: 'server',
prefetch: false,
site: SITE_URL,
adapter: vercel(),
integrations: [tailwind(), db(), react(), sitemap()],
vite: {
plugins: [
legacy({
targets: ['Chrome >= 70', 'defaults', 'not IE 11'],
additionalLegacyPolyfills: ['regenerator-runtime/runtime'],
}),
VitePWA({
registerType: 'autoUpdate',
manifest,
workbox: {
globDirectory: '.vercel/output/static',
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,
},
}),
],
},
})