-
Notifications
You must be signed in to change notification settings - Fork 4
/
nuxt.config.ts
134 lines (121 loc) · 2.73 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
import process from 'node:process'
const sw = process.env.SW === 'true'
export default defineNuxtConfig({
future: {
compatibilityVersion: 4,
typescriptBundlerResolution: true,
},
devtools: { enabled: true },
app: {
head: {
meta: [
{ name: 'theme-color', content: '#ffffff' },
{ name: 'name', content: 'Islam Application' },
{ name: 'author', content: 'Ionive Tech' },
],
htmlAttrs: {
lang: 'id',
},
},
},
css: ['./assets/css/main.scss'],
colorMode: {
preference: 'light',
fallback: 'light',
},
googleFonts: {
families: {
Inter: [100, 200, 300, 400, 500, 600, 700, 800, 900],
'Scheherazade New': true,
},
display: 'swap',
preload: true,
download: true,
},
modules: [
'@nuxt/eslint',
'@pinia/nuxt',
'@nuxt/ui',
'@nuxtjs/google-fonts',
'@vueuse/nuxt',
'@vite-pwa/nuxt',
],
pinia: {
storesDirs: ['./app/stores/**'],
},
postcss: {
plugins: {
'postcss-import': {},
tailwindcss: {},
autoprefixer: {},
...(process.env.NODE_ENV === 'production' ? {
cssnano: {
preset: ['default', {
discardComments: { removeAll: true },
}],
},
} : {}),
},
},
pwa: {
manifest: {
theme_color: '#ffffff',
background_color: '#ffffff',
display: 'standalone',
scope: '/',
start_url: '/',
name: 'Islam Application',
short_name: 'Islam App',
description: 'Web application for the Islamic religion',
icons: [
{
src: '/icon-pwa/icon-192x192.png',
sizes: '192x192',
type: 'image/png',
},
{
src: '/icon-pwa/icon-256x256.png',
sizes: '256x256',
type: 'image/png',
},
{
src: '/icon-pwa/icon-384x384.png',
sizes: '384x384',
type: 'image/png',
},
{
src: '/icon-pwa/icon-512x512.png',
sizes: '512x512',
type: 'image/png',
purpose: 'any',
},
{
src: '/icon-pwa/maskable-icon.png',
sizes: '512x512',
type: 'image/png',
purpose: 'maskable',
},
],
},
workbox: {
navigateFallback: null,
globPatterns: ['**/*.{js,css,html,png,svg,ico}'],
cleanupOutdatedCaches: false,
},
client: {
installPrompt: true,
periodicSyncForUpdates: 20,
},
devOptions: {
enabled: false,
type: 'module',
},
},
routeRules: {
'/': { prerender: true, redirect: '/al-quran' },
'/hadith': { isr: 3600 },
'/prayer': { isr: 3600 },
'/schedule': { ssr: false },
},
compatibilityDate: '2024-07-03',
})