-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnuxt.config.ts
183 lines (182 loc) · 14.2 KB
/
nuxt.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
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
// https://nuxt.com/docs/api/configuration/nuxt-config
import { defineNuxtConfig } from "nuxt/config"
import { md3 } from 'vuetify/blueprints'
export default defineNuxtConfig({
devtools: { enabled: true },
devServer: {
host: '0.0.0.0',
port: 8080
},
ssr: false,
runtimeConfig: {
public: {
apiBase: process.env.NUXT_PUBLIC_API_BASE || 'http://localhost:3000/api'
}
},
app: {
head: {
charset: 'utf-16',
viewport: 'width=device-width, initial-scale=1',
title: 'RUSDU',
meta: [
{ name: 'description', content: 'Biar gampang dilihat lagi' },
{ name: 'apple-mobile-web-app-capable', content: 'yes' },
{ name: 'mobile-web-app-capable', content: 'yes' }
],
link: [
{ rel: 'dns-prefetch', href: 'https://fonts.googleapis.com' },
{ rel: 'dns-prefetch', href: 'https://fonts.gstatic.com' },
{ rel: 'preconnect', crossorigin: 'anonymous', href: 'https://fonts.googleapis.com' },
{ rel: 'preconnect', crossorigin: 'anonymous', href: 'https://fonts.gstatic.com' },
{ rel: 'stylesheet', crossorigin: 'anonymous', href: 'https://fonts.googleapis.com/css2?family=Poppins&display=swap' },
{ rel: 'icon', href: '/splash_screens/icon.png' },
{ rel: 'apple-touch-startup-image', media: 'screen and (device-width: 440px) and (device-height: 956px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)', href: '/splash_screens/iPhone_16_Pro_Max_landscape.png' },
{ rel: 'apple-touch-startup-image', media: 'screen and (device-width: 402px) and (device-height: 874px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)', href: '/splash_screens/iPhone_16_Pro_landscape.png' },
{ rel: 'apple-touch-startup-image', media: 'screen and (device-width: 430px) and (device-height: 932px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)', href: '/splash_screens/iPhone_16_Plus__iPhone_15_Pro_Max__iPhone_15_Plus__iPhone_14_Pro_Max_landscape.png' },
{ rel: 'apple-touch-startup-image', media: 'screen and (device-width: 393px) and (device-height: 852px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)', href: '/splash_screens/iPhone_16__iPhone_15_Pro__iPhone_15__iPhone_14_Pro_landscape.png' },
{ rel: 'apple-touch-startup-image', media: 'screen and (device-width: 428px) and (device-height: 926px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)', href: '/splash_screens/iPhone_14_Plus__iPhone_13_Pro_Max__iPhone_12_Pro_Max_landscape.png' },
{ rel: 'apple-touch-startup-image', media: 'screen and (device-width: 390px) and (device-height: 844px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)', href: '/splash_screens/iPhone_14__iPhone_13_Pro__iPhone_13__iPhone_12_Pro__iPhone_12_landscape.png' },
{ rel: 'apple-touch-startup-image', media: 'screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)', href: '/splash_screens/iPhone_13_mini__iPhone_12_mini__iPhone_11_Pro__iPhone_XS__iPhone_X_landscape.png' },
{ rel: 'apple-touch-startup-image', media: 'screen and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)', href: '/splash_screens/iPhone_11_Pro_Max__iPhone_XS_Max_landscape.png' },
{ rel: 'apple-touch-startup-image', media: 'screen and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)', href: '/splash_screens/iPhone_11__iPhone_XR_landscape.png' },
{ rel: 'apple-touch-startup-image', media: 'screen and (device-width: 414px) and (device-height: 736px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape)', href: '/splash_screens/iPhone_8_Plus__iPhone_7_Plus__iPhone_6s_Plus__iPhone_6_Plus_landscape.png' },
{ rel: 'apple-touch-startup-image', media: 'screen and (device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)', href: '/splash_screens/iPhone_8__iPhone_7__iPhone_6s__iPhone_6__4.7__iPhone_SE_landscape.png' },
{ rel: 'apple-touch-startup-image', media: 'screen and (device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)', href: '/splash_screens/4__iPhone_SE__iPod_touch_5th_generation_and_later_landscape.png' },
{ rel: 'apple-touch-startup-image', media: 'screen and (device-width: 1032px) and (device-height: 1376px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)', href: '/splash_screens/13__iPad_Pro_M4_landscape.png' },
{ rel: 'apple-touch-startup-image', media: 'screen and (device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)', href: '/splash_screens/12.9__iPad_Pro_landscape.png' },
{ rel: 'apple-touch-startup-image', media: 'screen and (device-width: 834px) and (device-height: 1210px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)', href: '/splash_screens/11__iPad_Pro_M4_landscape.png' },
{ rel: 'apple-touch-startup-image', media: 'screen and (device-width: 834px) and (device-height: 1194px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)', href: '/splash_screens/11__iPad_Pro__10.5__iPad_Pro_landscape.png' },
{ rel: 'apple-touch-startup-image', media: 'screen and (device-width: 820px) and (device-height: 1180px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)', href: '/splash_screens/10.9__iPad_Air_landscape.png' },
{ rel: 'apple-touch-startup-image', media: 'screen and (device-width: 834px) and (device-height: 1112px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)', href: '/splash_screens/10.5__iPad_Air_landscape.png' },
{ rel: 'apple-touch-startup-image', media: 'screen and (device-width: 810px) and (device-height: 1080px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)', href: '/splash_screens/10.2__iPad_landscape.png' },
{ rel: 'apple-touch-startup-image', media: 'screen and (device-width: 768px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)', href: '/splash_screens/9.7__iPad_Pro__7.9__iPad_mini__9.7__iPad_Air__9.7__iPad_landscape.png' },
{ rel: 'apple-touch-startup-image', media: 'screen and (device-width: 744px) and (device-height: 1133px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape)', href: '/splash_screens/8.3__iPad_Mini_landscape.png' },
{ rel: 'apple-touch-startup-image', media: 'screen and (device-width: 440px) and (device-height: 956px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)', href: '/splash_screens/iPhone_16_Pro_Max_portrait.png' },
{ rel: 'apple-touch-startup-image', media: 'screen and (device-width: 402px) and (device-height: 874px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)', href: '/splash_screens/iPhone_16_Pro_portrait.png' },
{ rel: 'apple-touch-startup-image', media: 'screen and (device-width: 430px) and (device-height: 932px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)', href: '/splash_screens/iPhone_16_Plus__iPhone_15_Pro_Max__iPhone_15_Plus__iPhone_14_Pro_Max_portrait.png' },
{ rel: 'apple-touch-startup-image', media: 'screen and (device-width: 393px) and (device-height: 852px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)', href: '/splash_screens/iPhone_16__iPhone_15_Pro__iPhone_15__iPhone_14_Pro_portrait.png' },
{ rel: 'apple-touch-startup-image', media: 'screen and (device-width: 428px) and (device-height: 926px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)', href: '/splash_screens/iPhone_14_Plus__iPhone_13_Pro_Max__iPhone_12_Pro_Max_portrait.png' },
{ rel: 'apple-touch-startup-image', media: 'screen and (device-width: 390px) and (device-height: 844px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)', href: '/splash_screens/iPhone_14__iPhone_13_Pro__iPhone_13__iPhone_12_Pro__iPhone_12_portrait.png' },
{ rel: 'apple-touch-startup-image', media: 'screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)', href: '/splash_screens/iPhone_13_mini__iPhone_12_mini__iPhone_11_Pro__iPhone_XS__iPhone_X_portrait.png' },
{ rel: 'apple-touch-startup-image', media: 'screen and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)', href: '/splash_screens/iPhone_11_Pro_Max__iPhone_XS_Max_portrait.png' },
{ rel: 'apple-touch-startup-image', media: 'screen and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)', href: '/splash_screens/iPhone_11__iPhone_XR_portrait.png' },
{ rel: 'apple-touch-startup-image', media: 'screen and (device-width: 414px) and (device-height: 736px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)', href: '/splash_screens/iPhone_8_Plus__iPhone_7_Plus__iPhone_6s_Plus__iPhone_6_Plus_portrait.png' },
{ rel: 'apple-touch-startup-image', media: 'screen and (device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)', href: '/splash_screens/iPhone_8__iPhone_7__iPhone_6s__iPhone_6__4.7__iPhone_SE_portrait.png' },
{ rel: 'apple-touch-startup-image', media: 'screen and (device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)', href: '/splash_screens/4__iPhone_SE__iPod_touch_5th_generation_and_later_portrait.png' },
{ rel: 'apple-touch-startup-image', media: 'screen and (device-width: 1032px) and (device-height: 1376px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)', href: '/splash_screens/13__iPad_Pro_M4_portrait.png' },
{ rel: 'apple-touch-startup-image', media: 'screen and (device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)', href: '/splash_screens/12.9__iPad_Pro_portrait.png' },
{ rel: 'apple-touch-startup-image', media: 'screen and (device-width: 834px) and (device-height: 1210px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)', href: '/splash_screens/11__iPad_Pro_M4_portrait.png' },
{ rel: 'apple-touch-startup-image', media: 'screen and (device-width: 834px) and (device-height: 1194px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)', href: '/splash_screens/11__iPad_Pro__10.5__iPad_Pro_portrait.png' },
{ rel: 'apple-touch-startup-image', media: 'screen and (device-width: 820px) and (device-height: 1180px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)', href: '/splash_screens/10.9__iPad_Air_portrait.png' },
{ rel: 'apple-touch-startup-image', media: 'screen and (device-width: 834px) and (device-height: 1112px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)', href: '/splash_screens/10.5__iPad_Air_portrait.png' },
{ rel: 'apple-touch-startup-image', media: 'screen and (device-width: 810px) and (device-height: 1080px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)', href: '/splash_screens/10.2__iPad_portrait.png' },
{ rel: 'apple-touch-startup-image', media: 'screen and (device-width: 768px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)', href: '/splash_screens/9.7__iPad_Pro__7.9__iPad_mini__9.7__iPad_Air__9.7__iPad_portrait.png' },
{ rel: 'apple-touch-startup-image', media: 'screen and (device-width: 744px) and (device-height: 1133px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)', href: '/splash_screens/8.3__iPad_Mini_portrait.png' },
]
}
},
css: ['@/assets/main.scss'],
modules: [
'vuetify-nuxt-module',
'dayjs-nuxt',
'@pinia/nuxt',
'@pinia-plugin-persistedstate/nuxt',
'@unocss/nuxt',
'@vite-pwa/nuxt'
],
pwa: {
strategies: 'generateSW',
registerType: 'autoUpdate',
manifest: {
name: 'RUSDU',
short_name: 'Rusdu',
description: 'Jaga kelola harta',
background_color: '#FFFFFF',
theme_color: '#FFFFFF',
icons: [
{
src: '/splash_screens/icon.png',
sizes: '512x512',
type: 'image/png',
purpose: ['any']
}
],
id: 'rusdu/v0.2',
start_url: '/?source=pwa',
display: 'fullscreen',
scope: '/',
screenshots: [
{
src: '/splash_screens/4__iPhone_SE__iPod_touch_5th_generation_and_later_portrait.png',
type: 'image/png',
sizes: '640x1136'
},
{
src: '/splash_screens/iPhone_11__iPhone_XR_landscape.png',
type: 'image/png',
sizes: '1792x828',
form_factor: 'wide'
}
]
},
workbox: {
cacheId: 'rusdu',
runtimeCaching: [
{
urlPattern: /^https:\/\/fonts\.googleapis\.com\/.*/i,
handler: 'CacheFirst',
options: {
cacheName: 'google-fonts-cache',
expiration: {
maxEntries: 10,
maxAgeSeconds: 60 * 60 * 24 * 365 // <== 365 days
},
cacheableResponse: {
statuses: [0, 200]
}
}
},
{
urlPattern: /^https:\/\/fonts\.gstatic\.com\/.*/i,
handler: 'CacheFirst',
options: {
cacheName: 'gstatic-fonts-cache',
expiration: {
maxEntries: 10,
maxAgeSeconds: 60 * 60 * 24 * 365 // <== 365 days
},
cacheableResponse: {
statuses: [0, 200]
},
}
}
],
navigateFallback: '/',
globPatterns: ['**/*.{js,css,html,png,svg,ico}'],
},
client: {
installPrompt: true,
},
devOptions: {
suppressWarnings: true,
enabled: true,
type: 'module',
navigateFallback: '/',
navigateFallbackAllowlist: [/^\/$/],
}
},
vuetify: {
moduleOptions: {
},
vuetifyOptions: {
icons: {
defaultSet: 'unocss-mdi',
},
blueprint: md3,
theme: {
defaultTheme: 'light',
},
labComponents: ['VDateInput']
}
}
})