-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnuxt.config.ts
More file actions
110 lines (101 loc) · 2.65 KB
/
nuxt.config.ts
File metadata and controls
110 lines (101 loc) · 2.65 KB
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
import tailwindcss from '@tailwindcss/vite'
export default defineNuxtConfig({
compatibilityDate: '2025-07-15',
devtools: { enabled: process.env.NODE_ENV !== 'production' },
app: {
head: {
title: 'Arctic',
link: [{ rel: 'manifest', href: '/manifest.json' }],
},
},
modules: ['@vite-pwa/nuxt', '@nuxtjs/color-mode'],
colorMode: {
classSuffix: '',
preference: 'dark',
fallback: 'dark',
},
vite: {
plugins: tailwindcss() as any,
},
css: ['~/assets/css/main.css'],
nitro: {
experimental: {
tasks: true,
},
scheduledTasks: {},
},
runtimeConfig: {
jwtSecret: process.env.JWT_SECRET,
meilisearchHost: process.env.MEILISEARCH_HOST,
meilisearchApiKey: process.env.MEILI_MASTER_KEY,
databasePath: process.env.DATABASE_PATH,
filesPath: process.env.FILES_PATH,
public: {
appName: 'Arctic',
},
},
pwa: {
registerType: 'autoUpdate',
manifestFilename: 'manifest.json',
manifest: {
name: 'Arctic Note',
short_name: 'Arctic',
description: 'Personal Note-Taking App',
theme_color: '#3B4252',
background_color: '#3B4252',
display: 'standalone',
start_url: '/',
orientation: 'portrait',
icons: [
{ src: '/icon.png', sizes: '512x512', type: 'image/png' },
{ src: '/icon.png', sizes: '512x512', type: 'image/png', purpose: 'maskable' },
],
},
workbox: {
navigateFallback: null,
globPatterns: ['**/*.{js,css,html,ico,png,svg,woff2}'],
disableDevLogs: true,
navigationPreload: false,
runtimeCaching: [
{
urlPattern: ({ request }) => request.mode === 'navigate',
handler: 'NetworkFirst',
options: {
cacheName: 'pages',
networkTimeoutSeconds: 10,
cacheableResponse: { statuses: [0, 200] },
},
},
{
urlPattern: /^\/api\/notes/,
handler: 'NetworkFirst',
options: {
cacheName: 'api-notes',
networkTimeoutSeconds: 10,
cacheableResponse: { statuses: [0, 200] },
},
},
{
urlPattern: /^\/api\/labels/,
handler: 'NetworkFirst',
options: {
cacheName: 'api-labels',
networkTimeoutSeconds: 10,
cacheableResponse: { statuses: [0, 200] },
},
},
{
urlPattern: /^\/api\/files\//,
handler: 'NetworkOnly',
},
],
cleanupOutdatedCaches: true,
},
client: {
installPrompt: true,
},
devOptions: {
enabled: process.env.NODE_ENV !== 'production',
},
},
})