-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.ts
103 lines (102 loc) · 2.31 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
// https://nuxt.com/docs/api/configuration/nuxt-config
import process from 'node:process'
export default defineNuxtConfig({
imports: {
dirs: ['./composables', './utils', './data'],
},
devtools: {
enabled: true,
timeline: {
enabled: false,
},
},
app: {
pageTransition: { name: 'page', mode: 'out-in' },
},
experimental: {
// when using generate, payload js assets included in sw precache manifest
// but missing on offline, disabling extraction it until fixed
payloadExtraction: false,
// inlineSSRStyles: false,
renderJsonPayloads: true,
typedPages: true,
},
modules: [
'@nuxt/content',
'@nuxtjs/google-fonts',
'@vite-pwa/nuxt',
'@unocss/nuxt',
'@vueuse/nuxt',
],
content: {
respectPathCase: true,
highlight: {
preload: ['go'],
theme: 'github-dark',
},
markdown: {
remarkPlugins: [
'remark-math',
],
rehypePlugins: {
'rehype-katex': {
output: 'html', // the default value is 'htmlAndMathml'
},
},
},
},
googleFonts: {
preload: true,
prefetch: true,
families: {
'My Soul': true,
},
},
appConfig: {
buildDate: new Date().toISOString(),
},
pwa: {
disable: process.env.NODE_ENV === 'development',
mode: 'production',
registerType: 'autoUpdate',
manifest: {
name: 'Jannchie\'s',
short_name: 'Jannchie\'s',
theme_color: '#ffffff',
icons: [
{
src: 'imgs/jannchie-192.jpg',
sizes: '192x192',
type: 'image/png',
},
{
src: 'imgs/jannchie-512.jpg',
sizes: '512x512',
type: 'image/png',
},
{
src: 'imgs/jannchie-512.jpg',
sizes: '512x512',
type: 'image/png',
purpose: 'any maskable',
},
],
},
registerWebManifestInRouteRules: true,
writePlugin: true,
workbox: {
navigateFallback: '/',
navigateFallbackDenylist: [/^\/api\//],
cleanupOutdatedCaches: true,
globPatterns: ['**/*.{js,css,html,png,svg,ico}'],
},
client: {
installPrompt: true,
periodicSyncForUpdates: process.env.NODE_ENV === 'production' ? 3600 : 20,
},
devOptions: {
enabled: false,
navigateFallback: '/',
},
},
})