-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnuxt.config.ts
109 lines (108 loc) · 2.5 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
// https://nuxt.com/docs/api/configuration/nuxt-config
const sw = process.env.SW === "true";
export default defineNuxtConfig({
devServer: {
https: {
key: "./localhost-key.pem",
cert: "./localhost.pem",
},
},
devtools: { enabled: true },
app: {
head: {
htmlAttrs: {
lang: "en",
},
title: "Bolus calculator",
link: [
{
rel: "stylesheet",
href: "https://fonts.googleapis.com/icon?family=Material+Icons",
},
],
},
},
css: [
"@go-ui/vue/dist/go-ui.css",
"material-design-icons-iconfont/dist/material-design-icons.css",
],
typescript: {
typeCheck: true,
},
modules: [
"@pinia/nuxt",
"@vite-pwa/nuxt",
"@nuxtjs/supabase",
"@pinia-plugin-persistedstate/nuxt",
"@nuxtjs/google-fonts",
],
supabase: {
redirect: false,
},
pwa: {
manifest: {
name: "Bolus Calculator",
short_name: "Bolus Calculator",
theme_color: "#23219d",
display: "standalone",
start_url: "/",
scope: "/",
id: "/",
description: "Bolus calculator",
orientation: "natural",
icons: [
{
src: "pwa-192x192.png",
sizes: "192x192",
type: "image/png",
},
{
src: "pwa-512x512.png",
sizes: "512x512",
type: "image/png",
},
{
src: "pwa-512x512.png",
sizes: "512x512",
type: "image/png",
purpose: "any",
},
{
src: "pwa-512x512.png",
sizes: "512x512",
type: "image/png",
purpose: "maskable",
},
],
},
workbox: {
globPatterns: ["**/*.{js,json,woff2,css,html,png,svg,ico}"],
},
injectManifest: {
globPatterns: ["**/*.{js,json,woff2,css,html,png,svg,ico}"],
},
strategies: sw ? "injectManifest" : "generateSW",
srcDir: sw ? "service-worker" : undefined,
filename: sw ? "sw.ts" : undefined,
registerType: "autoUpdate",
client: {
installPrompt: true,
// you don't need to include this: only for testing purposes
// if enabling periodic sync for update use 1 hour or so (periodicSyncForUpdates: 3600)
periodicSyncForUpdates: 20,
},
devOptions: {
enabled: true,
suppressWarnings: true,
navigateFallback: "/",
navigateFallbackAllowlist: [/^\/$/],
type: "module",
},
},
googleFonts: {
families: {
Oswald: true,
Montserrat: true,
},
},
});