-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathastro.config.ts
69 lines (63 loc) · 1.76 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
import { defineConfig } from 'astro/config'
import { loadEnv } from 'vite'
import mkcert from 'vite-plugin-mkcert'
import UnoCSS from 'unocss/astro'
import node from '@astrojs/node'
import vue from '@astrojs/vue'
import AstroPWA from '@vite-pwa/astro'
const { APP_HOST, APP_PORT, APP_SITE, APP_BASE } = loadEnv(process.env.NODE_ENV, process.cwd(), '')
const basePath = `${(APP_BASE ?? '/').replace(/\/$/, '')}/`
export default defineConfig({
output: 'server',
server: {
host: APP_HOST,
port: +APP_PORT,
},
site: APP_SITE,
base: basePath,
integrations: [
vue({ appEntrypoint: '/src/pages/_app' }),
UnoCSS({
injectReset: true,
}),
AstroPWA({
registerType: 'autoUpdate',
base: basePath,
includeAssets: ['favicon.svg', 'favicon.ico', 'robots.txt', 'apple-touch-icon.png'],
manifest: {
name: 'Manila Observatory - Panahon',
short_name: 'MO - Panahon',
background_color: '#ffffff',
description: 'Manila Observatory - Panahon website',
theme_color: '#ffffff',
icons: [
{
src: `${basePath}resources/static/img/logo/android-chrome-192x192.png`,
sizes: '192x192',
type: 'image/png',
},
{
src: `${basePath}resources/static/img/logo/android-chrome-512x512.png`,
sizes: '512x512',
type: 'image/png',
},
{
src: `${basePath}resources/static/img/logo/android-chrome-512x512.png`,
sizes: '512x512',
type: 'image/png',
purpose: 'any maskable',
},
],
},
}),
],
vite: {
build: {
copyPublicDir: false,
},
plugins: [mkcert()],
},
adapter: node({
mode: 'standalone',
}),
})