-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathnuxt.config.ts
102 lines (101 loc) · 2.27 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
const moduleExclude = (match) => {
const m = (id) => id.indexOf(match) > -1;
return {
name: `exclude-${match}`,
resolveId(id) {
if (m(id)) return id;
},
load(id) {
if (m(id)) return `export default {}`;
},
};
};
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
compatibilityDate: "2024-04-03",
// devtools: { enabled: true },
modules: [
"@nuxt/ui",
"@nuxt/fonts",
"@pinia/nuxt",
"@vite-pwa/nuxt",
"nuxt-svgo",
],
fonts: {
families: [{ name: "Fredoka", provider: "google" }],
},
nitro: {
routeRules: {
"/": { prerender: true },
"/*": { prerender: true },
},
},
pwa: {
strategies: "generateSW",
registerWebManifestInRouteRules: true,
registerType: "autoUpdate",
includeAssets: ["index.html", "robots.txt"],
manifest: {
name: "PeerSplit | Track and split group expenses. 100% free, 100% private.",
short_name: "PeerSplit",
theme_color: "#89a1f0",
icons: [
{
src: "pwa-64x64.png",
sizes: "64x64",
type: "image/png",
},
{
src: "pwa-192x192.png",
sizes: "192x192",
type: "image/png",
},
{
src: "pwa-512x512.png",
sizes: "512x512",
type: "image/png",
},
{
src: "maskable-icon-512x512.png",
sizes: "512x512",
type: "image/png",
purpose: "maskable",
},
],
},
workbox: {
cleanupOutdatedCaches: true,
globPatterns: ["/", "**/*.{mjs,js,css,html,png,svg,ico}"],
},
injectManifest: {
globPatterns: ["/", "**/*.{mjs,js,css,html,png,svg,ico}"],
},
client: {
installPrompt: true,
},
devOptions: {
enabled: true,
suppressWarnings: true,
navigateFallback: "/",
navigateFallbackAllowlist: [/^\/$/],
type: "module",
},
},
vite: {
optimizeDeps: {
include: [
"gun",
"gun/gun",
"gun/sea",
"gun/sea.js",
"gun/lib/then",
"gun/lib/webrtc",
"gun/lib/radix",
"gun/lib/radisk",
"gun/lib/store",
"gun/lib/rindexed",
],
},
plugins: [moduleExclude("text-encoding")],
},
});